import ast


def get_all_names(tree):
    """
    Collect all identifier names from ast tree
    :param tree: _ast.Module
    :return: list
    """
    return [node.id for node in ast.walk(tree) if isinstance(node, ast.Name)]