class_docstr: A Worker object is created for each training thread.
class_docstr_tok: ["A","Worker","object","is","created","for","each","training","thread","."]
code: def run(self):
      rollouts = []
      local_vars = self.model.model.trainable_variables
      global_vars = self.ppo._model.model.trainable_variables
      for v1, v2 in zip(local_vars, global_vars):
          v1.assign(v2)
      initial_rnn_states = self.rnn_states
      (
          states,
          actions,
          action_prob,
          rewards,
          values,
      ) = self.create_rollout()
      rollouts.append(
          self.process_rollout(
              states,
              actions,
              action_prob,
              rewards,
              values,
              initial_rnn_states,
          )
      )
      if self.ppo.use_hindsight:
          rollouts.append(
              self.process_rollout_with_hindsight(
                  states, actions, initial_rnn_states
              )
          )
      return rollouts
  
imports: import copy
  import time
  from collections.abc import Sequence
  from multiprocessing.dummy import Pool
  import numpy
  import tensorflow
  from deepchem.models import KerasModel
  from deepchem.models.optimizers import Adam
label_desc: Use image node_id 2 for calling the _Worker obj's underlying member method code with example usage: obj.run() and returns: rollouts