code: def parse_py(text, path):
      """Parses text from .py file into Python structure."""
      with reraise(SyntaxError, PythonFileCorruptedError(path)):
          tree = ast.parse(text, filename=path)
  
      return _ast_tree_to_dict(tree)
  
file_path: dvc/dvc/utils/serialize/_py.py
imports: import ast
  from contextlib import contextmanager
  from typing import Any
  from funcy import reraise
  from ._common import ParseError, _dump_data, _load_data, _modify_data
label_desc: Use image node_id 2 for calling a global function with example usage: parse_py(text, path) and returns: _ast_tree_to_dict