code: def get_by_name(string: str):
      """
      Import by name and return imported module/function/class
  
      Args:
          string (str): module/function/class to import, e.g. 'pandas.read_csv' will return read_csv function as
          defined by pandas
  
      Returns:
          imported object
      """
      class_name = string.split(".")[-1]
      module_name = ".".join(string.split(".")[:-1])
  
      if module_name == "":
          return getattr(sys.modules[__name__], class_name)
  
      mod = __import__(module_name, fromlist=[class_name])
      return getattr(mod, class_name)
  
file_path: pytorch-forecasting/docs/source/conf.py
imports: import os
  from pathlib import Path
  import shutil
  import sys
  from sphinx.application import Sphinx
  from sphinx.ext.autosummary import Autosummary
  from sphinx.pycode import ModuleAnalyzer
  import pytorch_forecasting
label_desc: Use image node_id 2 for calling a global function with example usage: get_by_name(string) and returns: getattr, getattr