import ast


def get_functions_from_day_file(day: str):
    """
    Uses ast to retrieve all top level functions in the provided day file
    """
    with open(day) as f:
        parsed = ast.parse(f.read(), filename=day)

    return [func.name for func in parsed.body if isinstance(func, ast.FunctionDef)]