code: def reference_spatialbn_test16(
      X, scale, bias, mean, var, epsilon, order
  ):
      X = X.astype(np.float16)
      scale = scale.astype(np.float16)
      bias = bias.astype(np.float16)
      mean = mean.astype(np.float16)
      # var = var.astype(np.float16)
      assert order == "NCHW"
  
      scale = scale[np.newaxis, :, np.newaxis, np.newaxis]
      bias = bias[np.newaxis, :, np.newaxis, np.newaxis]
      mean = mean[np.newaxis, :, np.newaxis, np.newaxis]
      var = var[np.newaxis, :, np.newaxis, np.newaxis]
      Y = (
          (X - mean)
          * (scale / np.sqrt(var + epsilon).astype(np.float16))
      ) + bias
      return Y.astype(np.float32)
  
file_path: pytorch/caffe2/contrib/fakelowp/test/test_batchnorm_nnpi_fp16.py
imports: import numpy
  import unittest
  import caffe2.python.fakelowp.init_shared_libs
  from hypothesis import given, settings
  from hypothesis import strategies
  from caffe2.proto import caffe2_pb2
  from caffe2.python import core
  from caffe2.python import workspace
  from caffe2.python.onnx.onnxifi import onnxifi_caffe2_net
  from caffe2.python.fakelowp.test_utils import print_test_debug_info
  import caffe2.python.serialized_test.serialized_test_util
  import datetime
label_desc: Use image node_id 1 for calling a global function with example usage: reference_spatialbn_test16(X, scale, bias, mean, var, epsilon, order) and returns: Y