code: def main():
      root_path = os.path.dirname(
          os.path.dirname(os.path.abspath(__file__))
      )
      results = []
      for root, _dirs, files in os.walk(
          os.path.join(root_path, "mars")
      ):
          for fn in files:
              if "/tests" in root and not fn.startswith("test_"):
                  # allow test auxiliary files to use full imports
                  continue
              abs_path = os.path.join(root, fn)
              rel_path = os.path.relpath(abs_path, root_path)
  
              if not fn.endswith(".py"):
                  continue
              if any(
                  PurePath(rel_path).match(patt) for patt in _IGNORES
              ):
                  continue
  
              check_result = check_imports(abs_path)
              if check_result.has_faults:
                  results.append(check_result)
      if results:
          results = sorted(results, key=lambda x: x.path)
          format_results(results, root_path)
          sys.exit(1)
  
file_path: mars/ci/importcheck.py
imports: import ast
  import os
  import sys
  import textwrap
  from pathlib import PurePath
  from typing import List, NamedTuple, Optional, Tuple
label_desc: Use image node_id 5 for calling a global function with example usage: main() without return types