docstr: update the values of the graph
  
  :param local_grad: (numpy float) the gradient
  :param learning_rate: (float) the learning_rate for the update
docstr_tok: ["update","the","values","of","the","graph",":","param","local_grad",":","(","numpy","float",")","the","gradient",":","param","learning_rate",":","(","float",")","the","learning_rate","for","the","update"]
code: def update(self, local_grad, learning_rate):
      """
      update the values of the graph
  
      :param local_grad: (numpy float) the gradient
      :param learning_rate: (float) the learning_rate for the update
      """
      if self.step % 100 == 0:
          self.check_synced()
      local_grad = local_grad.astype("float32")
      global_grad = np.zeros_like(local_grad)
      self.comm.Allreduce(local_grad, global_grad, op=mpi4py.MPI.SUM)
      if self.scale_grad_by_procs:
          global_grad /= self.comm.Get_size()
  
      self.step += 1
      # Learning rate with bias correction
      step_size = (
          learning_rate
          * np.sqrt(1 - self.beta2**self.step)
          / (1 - self.beta1**self.step)
      )
      # Decay the first and second moment running average coefficient
      self.exp_avg = (
          self.beta1 * self.exp_avg + (1 - self.beta1) * global_grad
      )
      self.exp_avg_sq = self.beta2 * self.exp_avg_sq + (
          1 - self.beta2
      ) * (global_grad * global_grad)
      step = (
          (-step_size)
          * self.exp_avg
          / (np.sqrt(self.exp_avg_sq) + self.epsilon)
      )
      self.setfromflat(self.getflat() + step)
  
file_path: stable-baselines/stable_baselines/common/mpi_adam.py
imports: import tensorflow
  import numpy
  import mpi4py
  import stable_baselines.common.tf_util
label_desc: Use image node_id 2 for calling the MpiAdam obj's underlying member method code with example usage: obj.update(local_grad, learning_rate) without return types