code: def _post_action(self, action):
          
          reward = self.reward(action)
  
          # done if number of elapsed timesteps is greater than horizon
          self.done = (self.timestep >= self.horizon) and not self.ignore_done
          return reward, self.done, {}
docs: Do any housekeeping after taking an action.