def get_post_dep_imports(mod: Union[ModuleType, Path, str]):
    """Get all of the imports after the deprecation warning call."""

    src = get_module_source(mod)

    mod_ast = ast.parse(src)

    names = {}

    # get ast after the deprecation warning
    statements = list(reversed(mod_ast.body))
    statement = statements.pop()
    while len(statements) > 0:
        if (
            isinstance(statement, ast.Expr)
            and isinstance(statement.value, ast.Call)
            and isinstance(statement.value.func, ast.Attribute)
            and statement.value.func.attr == "packages_dep_warn"
            and statement.value.func.value.id == "deprecation_utils"
        ):
            break
        statement = statements.pop()

    mod_ast.body = list(reversed(statements))

    relevant = [
        node
        for node in ast.walk(mod_ast)
        if isinstance(node, (ast.Import, ast.ImportFrom))
    ]

    for node in relevant:
        if isinstance(node, ast.Import):
            for alias in node.names:
                names[alias.asname or alias.name] = node
        elif isinstance(node, ast.ImportFrom):
            for alias in node.names:
                names[alias.asname or alias.name] = node

    return names
Get all of the imports after the deprecation warning call.
.grit/dealias_trulens_eval.py