def Parse(self, filename):
    """ Parse a Python file using the ast module and return the Python AST."""
    try:
      tree = ast.parse(open(filename).read(), filename = filename)
      return tree
    except SyntaxError as e:
      error = "Error parsing file %s with ast module. Skipping\n"%(filename)
      logging.warning(error)
      return None
dataset/ETHPy150Open spranesh/Redhawk/redhawk/python/python_parser.py/PythonParser.Parse/original