<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_errors(project, resource):
 """Find possible bad name and attribute accesses It returns a list of `Error`\s. """

    pymodule = project.get_pymodule(resource)
    finder = _BadAccessFinder(pymodule)
    ast.walk(pymodule.get_ast(), finder)
    return finder.errors