class_docstr: A sampler worker for Task Embedding Algorithm.
  
  In addition to DefaultWorker, this worker adds one-hot task id to env_info,
  and adds latent and latent infos to agent_info.
  
  Args:
      seed (int): The seed to use to intialize random number generators.
      max_episode_length (int or float): The maximum length of episodes to
          sample. 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.
code: def __init__(
      self,
      *,  # Require passing by keyword, since everything's an int.
      seed,
      max_episode_length,
      worker_number,
  ):
      self._latents = []
      self._tasks = []
      self._latent_infos = defaultdict(list)
      self._z, self._t, self._latent_info = None, None, None
      super().__init__(
          seed=seed,
          max_episode_length=max_episode_length,
          worker_number=worker_number,
      )
  
file_path: garage/src/garage/tf/algos/te.py
imports: from collections import defaultdict
  import numpy
  from garage import EpisodeBatch, StepType
  from garage.sampler import DefaultWorker
label_desc: Use image node_id 1 to create a new TaskEmbeddingWorker object from inherited base classes: DefaultWorker with example: obj = TaskEmbeddingWorker()