docstr: Update the latest reward and mask
  
  :param rewards: ([float]) The new rewards for the new step
  :param masks: ([float]) The new masks for the new step
docstr_tok: ["Update","the","latest","reward","and","mask",":","param","rewards",":","(","[","float","]",")","The","new","rewards","for","the","new","step",":","param","masks",":","(","[","float","]",")","The","new","masks","for","the","new","step"]
code: def feed(self, rewards, masks):
      """
      Update the latest reward and mask
  
      :param rewards: ([float]) The new rewards for the new step
      :param masks: ([float]) The new masks for the new step
      """
      rewards = np.reshape(rewards, [self.n_envs, self.n_steps])
      masks = np.reshape(masks, [self.n_envs, self.n_steps])
      for i in range(0, self.n_envs):
          for j in range(0, self.n_steps):
              self.episode_rewards[i].append(rewards[i][j])
              if masks[i][j]:
                  reward_length = len(self.episode_rewards[i])
                  reward_sum = sum(self.episode_rewards[i])
                  self.len_buffer.append(reward_length)
                  self.rewbuffer.append(reward_sum)
                  self.episode_rewards[i] = []
  
imports: import time
  import warnings
  import numpy
  import tensorflow
  from gym.spaces import Discrete, Box
  from collections import deque
  from stable_baselines import logger
  from stable_baselines.common.schedules import Scheduler
  from stable_baselines.common.tf_util import batch_to_seq, seq_to_batch, check_shape, avg_norm, gradient_add, q_explained_variance, total_episode_reward_logger
  from stable_baselines.acer.buffer import Buffer
  from stable_baselines.common import ActorCriticRLModel, tf_util, SetVerbosity, TensorboardWriter
  from stable_baselines.common.runners import AbstractEnvRunner
  from stable_baselines.common.policies import ActorCriticPolicy, RecurrentActorCriticPolicy
label_desc: Use image node_id 2 for calling the EpisodeStats obj's underlying member method code with example usage: obj.feed(rewards, masks) without return types