code: def parse(
      source: str,
      filename: str = "<unknown>",
      mode: str = "exec",
  ) -> doc.AST:
      """Parse TVMScript source code str to doc AST.
  
      Its interface is consistent with python built-in ast.parse.
      And it will parse by python 3.8 first if possible,
      or it will parse with python version in current environment.
  
      Parameters
      ----------
      source : str
          The TVMScript source code.
  
      filename : str
          The optional filename of the file where source code locates.
  
      mode : str
          The parsing mode for ast.parse.
  
      Returns
      -------
      res : doc.AST
          The parsed doc AST.
      """
      try:
          program = ast.parse(  # pylint: disable=unexpected-keyword-arg
              source=source,
              filename=filename,
              mode=mode,
              feature_version=(3, 8),
          )
      except:  # pylint: disable=bare-except
          program = ast.parse(
              source=source,
              filename=filename,
              mode=mode,
          )
      return to_doc(program)
  
imports: import ast
  import inspect
  import sys
  import typing
  from collections import defaultdict
  from .None import doc_core
  from .doc_core import *
label_desc: Use image node_id 7 for calling a global function with example usage: parse(source, filename, mode) and returns: to_doc