code: def __init__(
      self,
      num_classes,
      source,
      axis=-1,
      num_threads=1,
      layout=None,
      axis_name=None,
      device="cpu",
  ):
      super(OneHotPipeline, self).__init__(batch_size, num_threads, 0)
      self.is_gpu = device == "gpu"
      self.ext_src = ops.ExternalSource(source=source, layout=layout)
      self.one_hot = ops.OneHot(
          num_classes=num_classes,
          axis=axis,
          dtype=types.INT32,
          device=device,
          axis_name=axis_name,
      )
  
imports: from functools import partial
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.types
  from test_utils import check_batch
  from nose_utils import raises
  import numpy
label_desc: Use image node_id 1 to create a new OneHotPipeline object from inherited base classes: Pipeline with example: obj = OneHotPipeline(num_classes, source, axis, num_threads, layout, axis_name, device)