class_docstr: Constructs workers for Samplers.
  
  The intent is that this object should be sufficient to avoid subclassing
  the sampler. Instead of subclassing the sampler for e.g. a specific
  backend, implement a specialized WorkerFactory (or specify appropriate
  functions to this one). Not that this object must be picklable, since it
  may be passed to workers. However, its fields individually need not be.
  
  All arguments to this type must be passed by keyword.
  
  Args:
      max_episode_length(int): The maximum length episodes which will be
          sampled.
      is_tf_worker (bool): Whether it is workers for TFTrainer.
      seed(int): The seed to use to initialize random number generators.
      n_workers(int): The number of workers to use.
      worker_class(type): Class of the workers. Instances should implement
          the Worker interface.
      worker_args (dict or None): Additional arguments that should be passed
          to the worker.
docstr: Construct a worker given its number.
  
  Args:
      worker_number(int): The worker number. Should be at least 0 and
          less than or equal to `n_workers`.
  
  Raises:
      ValueError: If the worker number is greater than `n_workers`.
  
  Returns:
      garage.sampler.Worker: The constructed worker.
docstr_tok: ["Construct","a","worker","given","its","number",".","Args",":","worker_number","(","int",")",":","The","worker","number",".","Should","be","at","least","0","and","less","than","or","equal","to","`","n_workers","`",".","Raises",":","ValueError",":","If","the","worker","number","is","greater","than","`","n_workers","`",".","Returns",":","garage.sampler.Worker",":","The","constructed","worker","."]
code: def __call__(self, worker_number):
      """Construct a worker given its number.
  
      Args:
          worker_number(int): The worker number. Should be at least 0 and
              less than or equal to `n_workers`.
  
      Raises:
          ValueError: If the worker number is greater than `n_workers`.
  
      Returns:
          garage.sampler.Worker: The constructed worker.
  
      """
      if worker_number >= self.n_workers:
          raise ValueError("Worker number is too big")
      return self._worker_class(
          worker_number=worker_number,
          seed=self._seed,
          max_episode_length=self._max_episode_length,
          **self._worker_args,
      )
  
imports: import psutil
  from garage.experiment.deterministic import get_seed
  from garage.sampler.default_worker import DefaultWorker
label_desc: Use image node_id 3 for calling the WorkerFactory obj's underlying member method code with example usage: obj.__call__(worker_number) and returns: self