import ast
from typing import List


def _get_module_function_names(module_node: ast.Module) -> List[str]:
    """For a module node, get a list of the function names defined in the 
    module scope."""
    result = []
    for node in ast.iter_child_nodes(module_node):
        if isinstance(node, ast.FunctionDef):
            result.append(node.name)
    return result