code: def get_mean_and_var(self, axis, gamma, x, xp, interm_dtype):
      gpu_buffer_n_elems = gamma.size * 2
      gpu_buffer_size = gamma.dtype.itemsize * gpu_buffer_n_elems
      gpu_buffer_a = self.memory_utility_module.DeviceMemory()
      gpu_buffer_b = self.memory_utility_module.DeviceMemory()
      gpu_buffer_a.assign(gpu_buffer_size)
      gpu_buffer_b.assign(gpu_buffer_size)
      gpu_buffer_a_array = gpu_buffer_a.array(
          gpu_buffer_n_elems, dtype=gamma.dtype
      )
      x.mean(
          axis=axis,
          out=gpu_buffer_a_array[: gamma.size],
          dtype=gamma.dtype,
      )
      xp.square(x).mean(
          axis=axis,
          out=gpu_buffer_a_array[gamma.size :],
          dtype=gamma.dtype,
      )
      self.comm._multi_node_mean_nccl(
          gpu_buffer_a, gpu_buffer_b, gpu_buffer_n_elems, gamma.dtype
      )
      gpu_buffer_a_array = gpu_buffer_b.array(
          gpu_buffer_n_elems, dtype=gamma.dtype
      )
  
      mean = gpu_buffer_a_array[: gamma.size]
      sqmean = gpu_buffer_a_array[gamma.size :]
      var = sqmean - xp.square(mean)
      return mean, var
  
file_path: chainer/chainermn/functions/batch_normalization.py
imports: import chainer
  from chainer.backends import cuda
  from chainer.functions.normalization import batch_normalization
  import chainer.utils
label_desc: Use image node_id 2 for calling the _NcclImpl obj's underlying member method code with example usage: obj.get_mean_and_var(axis, gamma, x, xp, interm_dtype) and returns: mean,  var