code: def batch_norm(
      in_batch, axes=None, mean=None, stddev=None, ddof=0, eps=0
  ):
      """
      normalize a batch as a whole
      non-reduced dims must have same extent in all batch items
      """
      if type(axes) is list:
          axes = tuple(axes)
  
      if mean is None:
          mean = batch_mean(in_batch, axes)
  
      if stddev is None:
          stddev = batch_stddev(in_batch, axes, mean, ddof, eps)
      elif eps:
          stddev = np.sqrt(stddev * stddev + eps)
  
      out = []
      for x in in_batch:
          with np.errstate(divide="ignore", invalid="ignore"):
              norm = (x - mean) / stddev
          out.append(
              np.nan_to_num(norm, copy=False, nan=0, posinf=0, neginf=0)
          )
      return out
  
imports: from nvidia.dali.pipeline import Pipeline
  from nvidia.dali import backend
  import nvidia.dali.ops
  import numpy
  from test_utils import dali_type
  from nvidia.dali import fn, pipeline_def, types
  from nose2.tools import params
label_desc: Use image node_id 5 for calling a global function with example usage: batch_norm(in_batch, axes, mean, stddev, ddof, eps) and returns: out