class_docstr: :class:`~EnvUpdate` that creates a new environment every update.
  
  Args:
      env_constructor (Callable[Environment]): Callable that constructs an
          environment.
class_docstr_tok: [":","class",":","`","~EnvUpdate","`","that","creates","a","new","environment","every","update",".","Args",":","env_constructor","(","Callable","[","Environment","]",")",":","Callable","that","constructs","an","environment","."]
docstr: Update an environment.
  
  Args:
      old_env (Environment or None): Previous environment. Should not be
          used after being passed in, and should not be closed.
  
  Returns:
      Environment: The new, updated environment.
docstr_tok: ["Update","an","environment",".","Args",":","old_env","(","Environment","or","None",")",":","Previous","environment",".","Should","not","be","used","after","being","passed","in",",","and","should","not","be","closed",".","Returns",":","Environment",":","The","new",",","updated","environment","."]
code: def __call__(self, old_env=None):
      """Update an environment.
  
      Args:
          old_env (Environment or None): Previous environment. Should not be
              used after being passed in, and should not be closed.
  
      Returns:
          Environment: The new, updated environment.
  
      """
      if old_env:
          old_env.close()
      return self._env_constructor()
  
file_path: garage/src/garage/sampler/env_update.py
imports: import warnings
label_desc: Use image node_id 2 for calling the NewEnvUpdate obj's underlying member method code with example usage: obj.__call__(old_env) and returns: self