class_docstr: Constructs a single sampler worker.
  
  Args:
      worker_id (int): The ID of this worker.
      env (Environment): Environment to sample form.
      agent_pkl (bytes): Pickled :class:`Policy` to sample with.
      worker_factory (WorkerFactory): Factory to construct this worker's
          behavior.
class_docstr_tok: ["Constructs","a","single","sampler","worker",".","Args",":","worker_id","(","int",")",":","The","ID","of","this","worker",".","env","(","Environment",")",":","Environment","to","sample","form",".","agent_pkl","(","bytes",")",":","Pickled",":","class",":","`","Policy","`","to","sample","with",".","worker_factory","(","WorkerFactory",")",":","Factory","to","construct","this","worker's","behavior","."]
docstr: Shuts down the worker.
docstr_tok: ["Shuts","down","the","worker","."]
code: def shutdown(self):
      """Shuts down the worker."""
      self.inner_worker.shutdown()
  
imports: from collections import defaultdict
  import itertools
  import click
  import cloudpickle
  import psutil
  import ray
  from garage import EpisodeBatch
  from garage.experiment.deterministic import get_seed
  from garage.sampler.default_worker import DefaultWorker
  from garage.sampler.sampler import Sampler
  from garage.sampler.worker_factory import WorkerFactory
label_desc: Use image node_id 4 for calling the SamplerWorker obj's underlying member method code with example usage: obj.shutdown() without return types