code: def _run(self, x, scale, bias, mean, var, epsilon=None, momentum=None):  # type: ignore
      if momentum is None:
          res = _batchnorm_test_mode(
              x, scale, bias, mean, var, epsilon=epsilon
          )
          return (res,)
      axis = tuple(np.delete(np.arange(len(x.shape)), 1))
      saved_mean = x.mean(axis=axis)
      saved_var = x.var(axis=axis)
      output_mean = mean * momentum + saved_mean * (1 - momentum)
      output_var = var * momentum + saved_var * (1 - momentum)
      res = _batchnorm_test_mode(
          x, scale, bias, output_mean, output_var, epsilon=epsilon
      )
      return (res,)
  
file_path: onnx/onnx/reference/ops/op_batch_normalization.py
imports: import numpy
  from onnx.reference.op_run import OpRun
label_desc: Use image node_id 1 for calling the BatchNormalization_9 obj's underlying member method code with example usage: obj._run(x, scale, bias, mean, var, epsilon, momentum) and returns: res, res