import ast


def _build_table(src):
    """ Builds AST tree table from given source.

    Args:
        src (str): source code
    
    Returns:
        dict: table of ast.AST nodes in tree
    """
    table = {}
    tree = ast.parse(src)
    for node in ast.walk(tree):
        curr = table.get(node.__class__, [])
        table[node.__class__] = curr + [node]
    return table