#USER INPUT# -> :"fba"
#USER INPUT# -> :"t"
#USER INPUT# -> :"exe"
#USER INPUT# -> :"#ml#def get_modules_from_source(file_path):"
#USER INPUT# -> :"    """"
#USER INPUT# -> :"    Parses a Python file and returns a list of module names imported within it."
#USER INPUT# -> :"    """"
#USER INPUT# -> :"    imported_modules = []"
#USER INPUT# -> :"    with open(file_path, 'r') as f:"
#USER INPUT# -> :"        tree = ast.parse(f.read())"
#USER INPUT# -> :""
#USER INPUT# -> :"    for node in ast.walk(tree):"
#USER INPUT# -> :"        if isinstance(node, ast.Import):"
#USER INPUT# -> :"            for alias in node.names:"
#USER INPUT# -> :"                imported_modules.append(alias.name)"
#USER INPUT# -> :"        elif isinstance(node, ast.ImportFrom):"
#USER INPUT# -> :"            if node.module: # Direct import from a module"
#USER INPUT# -> :"                imported_modules.append(node.module)"
#USER INPUT# -> :"    return sorted(list(set(imported_modules)))#ml#"
#USER INPUT# -> :"ff"
#USER INPUT# -> :"exe"
#USER INPUT# -> :"#ml#def get_modules_from_source(file_path):"
#USER INPUT# -> :"    """"
#USER INPUT# -> :"    Parses a Python file and returns a list of module names imported within it."
#USER INPUT# -> :"    """"
#USER INPUT# -> :"    imported_modules = []"
#USER INPUT# -> :"    with open(file_path, 'r') as f:"
#USER INPUT# -> :"        tree = ast.parse(f.read())"
#USER INPUT# -> :""
#USER INPUT# -> :"    for node in ast.walk(tree):"
#USER INPUT# -> :"        if isinstance(node, ast.Import):"
#USER INPUT# -> :"            for alias in node.names:"
#USER INPUT# -> :"                imported_modules.append(alias.name)"
#USER INPUT# -> :"        elif isinstance(node, ast.ImportFrom):"
#USER INPUT# -> :"            if node.module: # Direct import from a module"
#USER INPUT# -> :"                imported_modules.append(node.module)"
#USER INPUT# -> :"    return sorted(list(set(imported_modules)))"
#USER INPUT# -> :"save(get_modules_from_source(Path.cwd()))#ml#"
#USER INPUT# -> :"ff"
#USER INPUT# -> :""
#USER INPUT# -> :"b"
#USER INPUT# -> :"q"
#USER INPUT# -> :"0.0.653"
