class_docstr: Abstract base class of all samplers.
  
  Implementations of this class should override `construct`,
  `obtain_samples`, and `shutdown_worker`. `construct` takes a
  `WorkerFactory`, which implements most of the RL-specific functionality a
  `Sampler` needs. Specifically, it specifies how to construct `Worker`s,
  which know how to collect episodes and update both agents and environments.
  
  Currently, `__init__` is also part of the interface, but calling it is
  deprecated. `start_worker` is also deprecated, and does not need to be
  implemented.
docstr: Collect at least a given number transitions :class:`TimeStep`s.
  
  Args:
      itr (int): The current iteration number. Using this argument is
          deprecated.
      num_samples (int): Minimum number of :class:`TimeStep`s to sample.
      agent_update (object): Value which will be passed into the
          `agent_update_fn` before sampling episodes. If a list is passed
          in, it must have length exactly `factory.n_workers`, and will
          be spread across the workers.
      env_update (object): Value which will be passed into the
          `env_update_fn` before sampling episodes. If a list is passed
          in, it must have length exactly `factory.n_workers`, and will
          be spread across the workers.
  
  Returns:
      EpisodeBatch: The batch of collected episodes.
code: def obtain_samples(
      self, itr, num_samples, agent_update, env_update=None
  ):
      """Collect at least a given number transitions :class:`TimeStep`s.
  
      Args:
          itr (int): The current iteration number. Using this argument is
              deprecated.
          num_samples (int): Minimum number of :class:`TimeStep`s to sample.
          agent_update (object): Value which will be passed into the
              `agent_update_fn` before sampling episodes. If a list is passed
              in, it must have length exactly `factory.n_workers`, and will
              be spread across the workers.
          env_update (object): Value which will be passed into the
              `env_update_fn` before sampling episodes. If a list is passed
              in, it must have length exactly `factory.n_workers`, and will
              be spread across the workers.
  
      Returns:
          EpisodeBatch: The batch of collected episodes.
  
      """
  
file_path: garage/src/garage/sampler/sampler.py
imports: import abc
  import copy
label_desc: Use image node_id 4 for calling the Sampler obj's underlying member method code with example usage: obj.obtain_samples(itr, num_samples, agent_update, env_update) without return types