code: def update_mean_var_count_from_moments(
      mean, var, count, batch_mean, batch_var, batch_count
  ):
      """helper function that updates batch mean, variance, count
      Args:
          mean (np.array): current mean
          var (np.array): current variance
          count (float): current count
          batch_mean (np.array): batch mean
          batch_var (np.array): batch variance
          batch_count (int): batch size
      """
      delta = batch_mean - mean
      tot_count = count + batch_count
  
      new_mean = mean + delta * batch_count / tot_count
      m_a = var * count
      m_b = batch_var * batch_count
      M2 = (
          m_a + m_b + np.square(delta) * count * batch_count / tot_count
      )
      new_var = M2 / tot_count
      new_count = tot_count
  
      return new_mean, new_var, new_count
  
imports: import numpy
  import gym
  import time
  from parl.env.compat_wrappers import CompatWrapper
label_desc: Use image node_id 2 for calling a global function with example usage: update_mean_var_count_from_moments(mean, var, count, batch_mean, batch_var, batch_count) and returns: new_mean,  new_var,  new_count