code: def __init__(
      self,
      device,
      batch_size,
      dims,
      axes,
      axis_names,
      batch=False,
      out_type=None,
      in_type=None,
      shift=None,
      scale=None,
      num_threads=3,
      device_id=0,
      num_gpus=1,
  ):
      super(NormalizePipeline, self).__init__(
          batch_size,
          num_threads,
          device_id,
          seed=7865,
          exec_async=False,
          exec_pipelined=False,
      )
      common_args = {
          "device": device,
          "axes": axes,
          "axis_names": axis_names,
          "batch": batch,
          "dtype": dali_type(out_type),
          "shift": shift,
          "scale": scale,
      }
      self.in_type = in_type
      self.out_type = out_type
      self.device = device
      self.input = ops.ExternalSource()
      self.add_layout = None
      if axis_names is not None:
          layout = ""
          for i in range(dims):
              layout += chr(ord("a") + i)
          self.add_layout = ops.Reshape(layout=layout)
      self.batch = batch
      self.dims = dims
      self.has_axes = axes is not None or axis_names is not None
      self.scale = scale
      self.shift = shift
      self.is_integral = (
          out_type is not None and out_type is not np.float32
      )
  
      if axis_names is not None:
          axes = []
          for a in axis_names:
              axes.append(ord(a) - ord("a"))
  
      self.axes = axes
      self.axis_names = axis_names
      self.ddof = 2 if axes is not None and len(axes) > 0 else 0
      self.eps = 0.25
  
      self.mean = ops.PythonFunction(
          function=custom_mean(batch, axes), batch_processing=True
      )
      self.stddev = ops.PythonFunction(
          function=custom_stddev(batch, axes), batch_processing=True
      )
      self.normalize = ops.Normalize(**common_args, ddof=self.ddof)
      self.scalar_mean = ops.Normalize(
          **common_args, mean=1, ddof=self.ddof, epsilon=self.eps
      )
      self.scalar_stddev = ops.Normalize(
          **common_args, stddev=2, epsilon=self.eps
      )
      self.scalar_params = ops.Normalize(
          **common_args, mean=1, stddev=2
      )
  
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 1 to create a new NormalizePipeline object from inherited base classes: Pipeline with example: obj = NormalizePipeline(device, batch_size, dims, axes, axis_names, batch, out_type, in_type, shift, scale, num_threads, device_id, num_gpus)