class_docstr: Lazy import python module until use.
  
  Example:
      >>> from bigdl.llm.utils.common import LazyImport
      >>> _convert_to_ggml = LazyImport('bigdl.llm.ggml.convert._convert_to_ggml')
      >>> _convert_to_ggml(model_path, outfile_dir)
class_docstr_tok: ["Lazy","import","python","module","until","use",".","Example",":",">",">",">","from","bigdl.llm.utils.common","import","LazyImport",">",">",">","_convert_to_ggml","=","LazyImport","(","'bigdl.llm.ggml.convert._convert_to_ggml","'",")",">",">",">","_convert_to_ggml","(","model_path",",","outfile_dir",")"]
code: def __getattr__(self, name):
      absolute_name = importlib.util.resolve_name(self.module_name)
      # not reload modules
      try:
          return getattr(sys.modules[absolute_name], name)
      except (KeyError, AttributeError):
          pass
  
      if "." in absolute_name:
          # Split module name to prevent class name from being introduced as package
          parent_name, _, child_name = absolute_name.rpartition(".")
      else:
          parent_name, child_name = absolute_name, None
  
      try:
          # For import parent module and get the submodule with getattr.
          module = importlib.import_module(parent_name)
          module = getattr(module, child_name) if child_name else module
      except AttributeError:
          # Triggered when the parent module cannot get the child module using getattr.
          # More common when calling staticmethods or classmethods. e.g. from_tsdataset.
          full_module_name = (
              parent_name + "." + child_name
              if child_name
              else parent_name
          )
          spec = importlib.util.find_spec(full_module_name)
          module = importlib.util.module_from_spec(spec)
          spec.loader.exec_module(module)
  
      return getattr(module, name)
  
imports: import importlib
  import sys
label_desc: Use image node_id 2 for calling the LazyImport obj's underlying member method code with example usage: obj.__getattr__(name) and returns: getattr, getattr