code: def reward(self):
      
      raw_rewards, processed_rewards = 0, 0
      for ts in self.time_steps:
        # NOTE: raw_reward and processed_reward are None for the first time-step.
        if ts.raw_reward is not None:
          raw_rewards += ts.raw_reward
        if ts.processed_reward is not None:
          processed_rewards += ts.processed_reward
      return raw_rewards, processed_rewards
docs: Returns a tuple of sum of raw and processed rewards.