code: def batch_moments_nchw_ref(self, X):
      dims = X.shape
      N = dims[0]
      C = dims[1]
      X = X.reshape(N, C, -1)
      mu = np.mean(X, axis=(0, 2))
      var = np.mean(np.square(X), axis=(0, 2))
      return [mu, var]
  
file_path: pytorch/caffe2/python/operator_test/batch_moments_op_test.py
imports: from caffe2.python import core
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
  from hypothesis import given, settings
  import hypothesis.strategies
  import numpy
label_desc: Use image node_id 1 for calling the TestBatchMomentsOp obj's underlying member method code with example usage: obj.batch_moments_nchw_ref(X) and returns: list