code: def _reference_training(
      self,
      x,
      scale,
      offset,
      old_mean,
      old_var,
      epsilon,
      exponential_avg_factor,
      data_format,
  ):
      if data_format != "NHWC":
          raise ValueError(
              "data_format must be NHWC, got %s." % data_format
          )
      x_square = x * x
      x_square_sum = np.sum(x_square, (0, 1, 2))
      x_sum = np.sum(x, axis=(0, 1, 2))
      element_count = np.size(x) / int(np.shape(x)[-1])
      mean = x_sum / element_count
      var = x_square_sum / element_count - mean * mean
      factor = element_count / max(element_count - 1, 1)
      corrected_var = var * factor
      normalized = (x - mean) / np.sqrt(var + epsilon)
      if exponential_avg_factor != 1.0:
          mean = (
              1.0 - exponential_avg_factor
          ) * old_mean + exponential_avg_factor * mean
          corrected_var = (
              1.0 - exponential_avg_factor
          ) * old_var + exponential_avg_factor * corrected_var
      return (normalized * scale + offset), mean, var, corrected_var
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import test_utils
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import nn
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the FusedBatchNormTest obj's underlying member method code with example usage: obj._reference_training(x, scale, offset, old_mean, old_var, epsilon, exponential_avg_factor, data_format) and returns: unknown,  mean,  var,  corrected_var