code: def get_obj_and_module(obj_path):
      splits = obj_path.split(".")
      for i in reversed(range(1, len(splits) + 1)):
          try:
              maybe_module = ".".join(splits[:i])
              mod = importlib.import_module(maybe_module)
          except ImportError:
              continue
          return mod, functools.reduce(getattr, splits[i:], mod)
  
      raise Exception("Should not reach here")
  
file_path: mlflow/docs/source/testcode_block.py
imports: import textwrap
  import importlib
  import inspect
  import functools
  import re
  from pathlib import Path
  from sphinx.directives.code import CodeBlock
label_desc: Use image node_id 1 for calling a global function with example usage: get_obj_and_module(obj_path) and returns: mod,  functools