code: def get_library_class_object(module_method_name, *args, **kwargs):
      """
      Import library for causal inference.
  
      """
      # from https://www.bnmetrics.com/blog/factory-pattern-in-python3-simple-version
      try:
          (module_name, _, class_name) = module_method_name.rpartition(
              "."
          )
          discovery_module = import_module(module_name)
          discovery_class = getattr(discovery_module, class_name)
  
      except (AttributeError, AssertionError, ImportError):
          raise ImportError(
              "Error loading {}.{}. Double-check the method name and ensure that all library dependencies are installed.".format(
                  module_name, class_name
              )
          )
      return discovery_class
  
label_desc: Use image node_id 2 for calling a global function with example usage: get_library_class_object(module_method_name) and returns: discovery_class