code: def test_batch_moments_3d(self, N, C, T, H, W, order, gc, dc):
      op = core.CreateOperator(
          "BatchMoments",
          ["X"],
          ["mu", "var"],
          order=order,
      )
  
      if order == "NCHW":
          X = np.random.randn(N, C, T, H, W).astype(np.float32)
      else:
          X = np.random.randn(N, T, H, W, C).astype(np.float32)
  
      def ref(X):
          if order == "NCHW":
              return self.batch_moments_nchw_ref(X)
          else:
              return self.batch_moments_nhwc_ref(X)
  
      self.assertReferenceChecks(
          device_option=gc,
          op=op,
          inputs=[X],
          reference=ref,
      )
      self.assertDeviceChecks(dc, op, [X], [0, 1])
      self.assertGradientChecks(gc, op, [X], 0, [0, 1])
  
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 4 for calling the TestBatchMomentsOp obj's underlying member method code with example usage: obj.test_batch_moments_3d(N, C, T, H, W, order, gc, dc) and returns: self, self