code: def test_spatialbn_train_mode(
      self,
      size,
      input_channels,
      batch_size,
      seed,
      order,
      epsilon,
      gc,
      dc,
  ):
      op = core.CreateOperator(
          "SpatialBN",
          ["X", "scale", "bias", "running_mean", "running_var"],
          [
              "Y",
              "running_mean",
              "running_var",
              "saved_mean",
              "saved_var",
          ],
          order=order,
          is_test=False,
          epsilon=epsilon,
      )
      np.random.seed(seed)
      scale = np.random.rand(input_channels).astype(np.float32) + 0.5
      bias = np.random.rand(input_channels).astype(np.float32) - 0.5
      mean = np.random.randn(input_channels).astype(np.float32)
      var = np.random.rand(input_channels).astype(np.float32) + 0.5
      X = (
          np.random.rand(batch_size, input_channels, size, size).astype(
              np.float32
          )
          - 0.5
      )
      # Note: it seems that the running mean and var do not pass the device
      # test, suggesting that the semantics are a bit different. Only
      # checking the output and saved mean and var at this stage.
      self.assertDeviceChecks(
          dc, op, [X, scale, bias, mean, var], [0, 3, 4]
      )
  
file_path: pytorch/caffe2/python/mkl/mkl_sbn_op_test.py
imports: import unittest
  import hypothesis.strategies
  from hypothesis import given
  import numpy
  from caffe2.python import core, workspace
  import caffe2.python.hypothesis_test_util
  import caffe2.python.mkl_test_util
label_desc: Use image node_id 2 for calling the MKLSpatialBNTest obj's underlying member method code with example usage: obj.test_spatialbn_train_mode(size, input_channels, batch_size, seed, order, epsilon, gc, dc) without return types