code: def recompute_stats(self):
      with self.lock:
          # Copy over results.
          local_count = self.local_count.copy()
          local_sum = self.local_sum.copy()
          local_sumsq = self.local_sumsq.copy()
  
          # Reset.
          self.local_count[...] = 0
          self.local_sum[...] = 0
          self.local_sumsq[...] = 0
  
      # We perform the synchronization outside of the lock to keep the critical section as short
      # as possible.
      synced_sum, synced_sumsq, synced_count = self.synchronize(
          local_sum=local_sum,
          local_sumsq=local_sumsq,
          local_count=local_count,
      )
  
      self.sess.run(
          self.update_op,
          feed_dict={
              self.count_pl: synced_count,
              self.sum_pl: synced_sum,
              self.sumsq_pl: synced_sumsq,
          },
      )
      self.sess.run(self.recompute_op)
  
file_path: baselines/baselines/her/normalizer.py
imports: import threading
  import numpy
  from mpi4py import MPI
  import tensorflow
  from baselines.her.util import reshape_for_broadcasting
label_desc: Use image node_id 7 for calling the Normalizer obj's underlying member method code with example usage: obj.recompute_stats() without return types