code: def learn(self, rewards, noises):
      gradient = np.dot(
          np.asarray(rewards, dtype=np.float32),
          np.asarray(noises, dtype=np.float32),
      )
      gradient /= rewards.size
  
      flat_weights = self.get_flat_weights()
      # Compute the new weights.
      new_weights = flat_weights + self.learning_rate * gradient
      self.set_flat_weights(new_weights)
  
file_path: PARL/examples/others/deepes.py
imports: import gym
  import numpy
label_desc: Use image node_id 3 for calling the CartpoleAgent obj's underlying member method code with example usage: obj.learn(rewards, noises) without return types