code: def test_instance_norm_layout(
      self,
      gc,
      dc,
      N,
      C,
      H,
      W,
      store_mean,
      store_inv_stdev,
      epsilon,
      seed,
  ):
      # force store_inv_stdev if store_mean to match existing forward pass
      # implementation
      store_inv_stdev |= store_mean
  
      outputs = {}
      for order in ("NCHW", "NHWC"):
          np.random.seed(seed)
          input_blobs = self._get_inputs(N, C, H, W, order)
          self._feed_inputs(input_blobs, device_option=gc)
          op = self._get_op(
              device_option=gc,
              store_mean=store_mean,
              store_inv_stdev=store_inv_stdev,
              epsilon=epsilon,
              order=order,
          )
          self.ws.run(op)
          outputs[order] = self.ws.blobs["output"].fetch()
      np.testing.assert_allclose(
          outputs["NCHW"],
          utils.NHWC2NCHW(outputs["NHWC"]),
          atol=1e-4,
          rtol=1e-4,
      )
  
file_path: pytorch/caffe2/python/operator_test/instance_norm_test.py
imports: import numpy
  from hypothesis import given, assume, settings
  import hypothesis.strategies
  from caffe2.python import core, model_helper, brew, utils
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
  import unittest
label_desc: Use image node_id 5 for calling the TestInstanceNorm obj's underlying member method code with example usage: obj.test_instance_norm_layout(gc, dc, N, C, H, W, store_mean, store_inv_stdev, epsilon, seed) without return types