code: def get_class_object(method_name, *args, **kwargs):
      # from https://www.bnmetrics.com/blog/factory-pattern-in-python3-simple-version
      try:
          module_name = method_name
          class_name = string.capwords(method_name, "_").replace(
              "_", ""
          )
          do_sampler_module = import_module(
              "." + module_name, package=PACKAGE_NAME
          )
          do_sampler_class = getattr(do_sampler_module, class_name)
          assert issubclass(do_sampler_class, DoSampler)
  
      except (AttributeError, AssertionError, ImportError) as e:
          if (
              isinstance(e, ImportError)
              and e.name != PACKAGE_NAME + "." + module_name
          ):
              raise e
          raise ImportError(
              "{} is not an existing do sampler.".format(method_name)
          )
      return do_sampler_class
  
label_desc: Use image node_id 1 for calling a global function with example usage: get_class_object(method_name) and returns: do_sampler_class