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: Construct a Sampler from an Algorithm.
  
  Args:
      algo (RLAlgorithm): The RL Algorithm controlling this
          sampler.
      env (Environment): The environment being sampled from.
  
  Calling this method is deprecated.
code: def __init__(self, algo, env):
      """Construct a Sampler from an Algorithm.
  
      Args:
          algo (RLAlgorithm): The RL Algorithm controlling this
              sampler.
          env (Environment): The environment being sampled from.
  
      Calling this method is deprecated.
  
      """
      self.algo = algo
      self.env = env
  
file_path: garage/src/garage/sampler/sampler.py
imports: import abc
  import copy
label_desc: Use image node_id 1 to create a new Sampler object from inherited base classes: abc with example: obj = Sampler(algo, env)