class_docstr: Acts like a Worker class, but is actually an object.
  
  When called, constructs the wrapped class and wraps it in a
  :class:`~TFWorkerWrapper`.
  
  Args:
      wrapped_class (type): The class to wrap. Should be a subclass of
          :class:`~Worker`.
class_docstr_tok: ["Acts","like","a","Worker","class",",","but","is","actually","an","object",".","When","called",",","constructs","the","wrapped","class","and","wraps","it","in","a",":","class",":","`","~TFWorkerWrapper","`",".","Args",":","wrapped_class","(","type",")",":","The","class","to","wrap",".","Should","be","a","subclass","of",":","class",":","`","~Worker","`","."]
docstr: Construct the inner class and wrap it.
  
  Args:
      *args: Passed on to inner worker class.
      **kwargs: Passed on to inner worker class.
  
  Returns:
      TFWorkerWrapper: The wrapped worker.
docstr_tok: ["Construct","the","inner","class","and","wrap","it",".","Args",":","*","args",":","Passed","on","to","inner","worker","class",".","*","*","kwargs",":","Passed","on","to","inner","worker","class",".","Returns",":","TFWorkerWrapper",":","The","wrapped","worker","."]
code: def __call__(self, *args, **kwargs):
      """Construct the inner class and wrap it.
  
      Args:
          *args: Passed on to inner worker class.
          **kwargs: Passed on to inner worker class.
  
      Returns:
          TFWorkerWrapper: The wrapped worker.
  
      """
      wrapper = TFWorkerWrapper()
      # Need to construct the wrapped class after we've entered the Session.
      wrapper._inner_worker = self._wrapped_class(*args, **kwargs)
      return wrapper
  
file_path: garage/src/garage/tf/samplers/worker.py
imports: import tensorflow
  from garage.sampler.worker import Worker
label_desc: Use image node_id 2 for calling the TFWorkerClassWrapper obj's underlying member method code with example usage: obj.__call__() and returns: wrapper