code: def get_class(class_name, module_paths=None):
      """Returns the class based on class name.
  
      Args:
          class_name (str): Name or full path to the class.
          module_paths (list): Paths to candidate modules to search for the
              class. This is used if the class cannot be located solely based on
              `class_name`. The first module in the list that contains the class
              is used.
  
      Returns:
          The target class.
  
      Raises:
          ValueError: If class is not found based on :attr:`class_name` and
              :attr:`module_paths`.
      """
      class_ = locate(class_name)
      if (class_ is None) and (module_paths is not None):
          for module_path in module_paths:
              # if module_path in _unimportable_modules:
              # Special treatment for unimportable modules by directly
              # accessing the class
              class_ = locate(".".join([module_path, class_name]))
              if class_ is not None:
                  break
              # else:
              #    module = importlib.import_module(module_path)
              #    if class_name in dir(module):
              #        class_ = getattr(module, class_name)
              #        break
  
      if class_ is None:
          raise ValueError(
              "Class not found in {}: {}".format(
                  module_paths, class_name
              )
          )
  
      return class_
  
imports: from typing import List, Union
  import inspect
  import funcsigs
  from pydoc import locate
  import copy
  import collections
  import numpy
  import tensorflow
  from texar.tf.hyperparams import HParams
  from texar.tf.utils.dtypes import is_str, is_callable, compat_as_text, _maybe_list_to_array
label_desc: Use image node_id 6 for calling a global function with example usage: get_class(class_name, module_paths) and returns: class_