class_docstr: Initialize a worker.
  
  Args:
      seed (int): The seed to use to intialize random number generators.
      max_episode_length (int or float): The maximum length of episodes which
          will be sampled. Can be (floating point) infinity.
      worker_number (int): The number of the worker where this update is
          occurring. This argument is used to set a different seed for each
          worker.
  
  Attributes:
      agent (Policy or None): The worker's agent.
      env (Environment or None): The worker's environment.
class_docstr_tok: ["Initialize","a","worker",".","Args",":","seed","(","int",")",":","The","seed","to","use","to","intialize","random","number","generators",".","max_episode_length","(","int","or","float",")",":","The","maximum","length","of","episodes","which","will","be","sampled",".","Can","be","(","floating","point",")","infinity",".","worker_number","(","int",")",":","The","number","of","the","worker","where","this","update","is","occurring",".","This","argument","is","used","to","set","a","different","seed","for","each","worker",".","Attributes",":","agent","(","Policy","or","None",")",":","The","worker","'s","agent",".","env","(","Environment","or","None",")",":","The","worker","'s","environment","."]
docstr: Use any non-None env_update as a new environment.
  
  A simple env update function. If env_update is not None, it should be
  the complete new environment.
  
  This allows changing environments by passing the new environment as
  `env_update` into `obtain_samples`.
  
  Args:
      env_update(Environment or EnvUpdate or None): The environment to
          replace the existing env with. Note that other implementations
          of `Worker` may take different types for this parameter.
  
  Raises:
      TypeError: If env_update is not one of the documented types.
docstr_tok: ["Use","any","non-None","env_update","as","a","new","environment",".","A","simple","env","update","function",".","If","env_update","is","not","None",",","it","should","be","the","complete","new","environment",".","This","allows","changing","environments","by","passing","the","new","environment","as","`","env_update","`","into","`","obtain_samples","`",".","Args",":","env_update","(","Environment","or","EnvUpdate","or","None",")",":","The","environment","to","replace","the","existing","env","with",".","Note","that","other","implementations","of","`","Worker","`","may","take","different","types","for","this","parameter",".","Raises",":","TypeError",":","If","env_update","is","not","one","of","the","documented","types","."]
code: def update_env(self, env_update):
      """Use any non-None env_update as a new environment.
  
      A simple env update function. If env_update is not None, it should be
      the complete new environment.
  
      This allows changing environments by passing the new environment as
      `env_update` into `obtain_samples`.
  
      Args:
          env_update(Environment or EnvUpdate or None): The environment to
              replace the existing env with. Note that other implementations
              of `Worker` may take different types for this parameter.
  
      Raises:
          TypeError: If env_update is not one of the documented types.
  
      """
      self.env, _ = _apply_env_update(self.env, env_update)
  
file_path: garage/src/garage/sampler/default_worker.py
imports: from collections import defaultdict
  import numpy
  from garage import EpisodeBatch, StepType
  from garage.experiment import deterministic
  from garage.sampler import _apply_env_update
  from garage.sampler.worker import Worker
label_desc: Use image node_id 4 for calling the DefaultWorker obj's underlying member method code with example usage: obj.update_env(env_update) without return types