import ast


def find_check_definition(tree):
    """Given an AST for a source, check for definitions of `gofer_check` function

    Returns True if such a definition is found, False otherwise."""
    for stmt in ast.walk(tree):
        if not isinstance(stmt, ast.FunctionDef):
            continue
        if stmt.name == 'gofer_check':
            return True
    return False