class_docstr: Supports the creation of instances from configuration, that can be plugged into the environments
  (like demand generators or reward schemes).
  
  :param base_type: A common interface (parent class) of the registered types (e.g. DemandGenerator)
class_docstr_tok: ["Supports","the","creation","of","instances","from","configuration",",","that","can","be","plugged","into","the","environments","(","like","demand","generators","or","reward","schemes",")",".",":","param","base_type",":","A","common","interface","(","parent","class",")","of","the","registered","types","(","e.g",".","DemandGenerator",")"]
docstr: Import the given module and lookup the callable or class from the module with the correct base type.
  
  :param name: Fully qualified name including the module path (e.g.
               ``maze_envs.logistics.property_based_replenishment.env.maze_env.MazeEnv``)
  :return: The one and only callable or class with the given name that derives from base_type.
docstr_tok: ["Import","the","given","module","and","lookup","the","callable","or","class","from","the","module","with","the","correct","base","type",".",":","param","name",":","Fully","qualified","name","including","the","module","path","(","e.g",".","``","maze_envs.logistics.property_based_replenishment.env.maze_env.MazeEnv","``",")",":","return",":","The","one","and","only","callable","or","class","with","the","given","name","that","derives","from","base_type","."]
code: def type_from_name(
      self, name: Union[str, Type[BaseType]]
  ) -> Type[BaseType]:
      """Import the given module and lookup the callable or class from the module with the correct base type.
  
      :param name: Fully qualified name including the module path (e.g.
                   ``maze_envs.logistics.property_based_replenishment.env.maze_env.MazeEnv``)
      :return: The one and only callable or class with the given name that derives from base_type.
      """
      if not isinstance(name, str) and issubclass(name, self.base_type):
          return name
  
      full_name = name
  
      name, specified_class_name = self._split_module_and_class(name)
  
      module = importlib.import_module(name)
      obj_type = getattr(module, specified_class_name, None)
      if not obj_type:
          raise ValueError(
              f"'{specified_class_name}' not found in module '{name}'"
          )
  
      if self.base_type != Callable and not issubclass(
          obj_type, self.base_type
      ):
          raise ValueError(
              f"Class '{full_name}' is not of type {self.base_type}"
          )
  
      return obj_type
  
file_path: maze/maze/core/utils/factory.py
imports: import copy
  import importlib
  from typing import TypeVar, Type, Dict, Union, Any, List, Mapping, Generic, Tuple, Sequence, Callable
  import omegaconf
  from hydra.utils import instantiate
  from omegaconf import open_dict, DictConfig
label_desc: Use image node_id 5 for calling the Factory obj's underlying member method code with example usage: obj.type_from_name(name) and returns: obj_type, name