code: def get_ast_tree(cls):
      path = Path(inspect.getfile(cls))
      stubpath = path.with_suffix(".pyi")
      path = stubpath if stubpath.exists() else path
      tree = ast.parse(path.read_text())
      for item in tree.body:
          if (
              isinstance(item, ast.ClassDef)
              and item.name == cls.__name__
          ):
              return item
      raise ValueError(f"Cannot find {cls.__name__} in ast")
  
imports: import ast
  from enum import Enum
  import functools
  import inspect
  from inspect import Parameter
  from pathlib import Path
  import sys
  import subprocess
  import numpy
  from matplotlib import _api, mlab
  from matplotlib.axes import Axes
  from matplotlib.backend_bases import MouseButton
  from matplotlib.figure import Figure
label_desc: Use image node_id 5 for calling a global function with example usage: get_ast_tree(cls) and returns: item