class_docstr: Handles dynamic registration of Wrapper sub-classes.
docstr: Wraps environment in wrappers specified in wrapper_config.
  
  :param env: Environment to wrap.
  :param wrapper_config: Wrapper specification.
  :return: Wrapped environment of type Wrapper.
docstr_tok: ["Wraps","environment","in","wrappers","specified","in","wrapper_config",".",":","param","env",":","Environment","to","wrap",".",":","param","wrapper_config",":","Wrapper","specification",".",":","return",":","Wrapped","environment","of","type","Wrapper","."]
code: def wrap_from_config(
      cls, env: T, wrapper_config: CollectionOfConfigType
  ) -> Union[Wrapper, T]:
      """
      Wraps environment in wrappers specified in wrapper_config.
  
      :param env: Environment to wrap.
      :param wrapper_config: Wrapper specification.
      :return: Wrapped environment of type Wrapper.
      """
  
      wrapped_env: Union[Wrapper, T] = env
      for wrapper_module in wrapper_config:
          wrapped_env = (
              Factory(Wrapper)
              .type_from_name(wrapper_module)
              .wrap(
                  wrapped_env,
                  # Pass on additional arguments
                  **wrapper_config[wrapper_module],
              )
          )
  
      return wrapped_env
  
file_path: maze/maze/core/wrappers/wrapper_factory.py
imports: from typing import Union, TypeVar
  from maze.core.env.base_env import BaseEnv
  from maze.core.utils.factory import Factory, CollectionOfConfigType
  from maze.core.wrappers.wrapper import Wrapper
label_desc: Use image node_id 2 for calling the WrapperFactory obj's underlying member method code with example usage: obj.wrap_from_config(cls, env, wrapper_config) and returns: wrapped_env