code: def get_discovery_class_object(method_name, *args, **kwargs):
      """
      Import class from graph_learners.
  
      """
      # from https://www.bnmetrics.com/blog/factory-pattern-in-python3-simple-version
      try:
          module_name = method_name
          class_name = module_name.upper()
  
          discovery_module = import_module(
              "." + module_name, package="dowhy.graph_learners"
          )
          discovery_class = getattr(discovery_module, class_name)
          assert issubclass(discovery_class, GraphLearner)
  
      except (AttributeError, AssertionError, ImportError):
          raise ImportError(
              "{} is not an existing causal discovery method.".format(
                  method_name
              )
          )
      return discovery_class
  
label_desc: Use image node_id 1 for calling a global function with example usage: get_discovery_class_object(method_name) and returns: discovery_class