code: def _define_pipeline(self):
      with self._pipe:
          images, bboxes, classes = ops.input(
              self._file_root,
              self._annotations_file,
              self._device_id,
              self._num_threads,
              "mixed" if self._use_gpu else "cpu",
          )
          images = dali.fn.resize(
              images,
              resize_x=self._image_size[0],
              resize_y=self._image_size[1],
              interp_type=dali.types.DALIInterpType.INTERP_LINEAR,
          )
  
          if self._is_training:
              images = ops.color_twist(images)
              images, bboxes = ops.flip(images, bboxes)
  
              if self._use_mosaic:
                  do_mosaic = dali.fn.random.coin_flip()
                  images_m, bboxes_m, classes_m = ops.mosaic(
                      images, bboxes, classes, self._image_size
                  )
  
                  images = (
                      images * (1.0 - do_mosaic) + images_m * do_mosaic
                  )
                  bboxes = ops.select(do_mosaic, bboxes_m, bboxes)
                  classes = dali.fn.squeeze(
                      ops.select(
                          do_mosaic,
                          dali.fn.expand_dims(classes_m, axes=1),
                          dali.fn.expand_dims(classes, axes=1),
                      ),
                      axes=1,
                  )
  
          bboxes = ops.ltrb_to_xywh(bboxes)
  
          images = images * (1.0 / 255.0)
          # subtract one to be consistent with darknet's pretrained model weights
          classes = dali.fn.expand_dims(classes, axes=1) - 1.0
  
          labels = dali.fn.cat(bboxes, classes, axis=1)
          labels = dali.fn.pad(labels, fill_value=-1)
          labels = dali.fn.pad(labels, fill_value=-1, shape=(1, 5))
  
          self._pipe.set_outputs(images.gpu(), labels.gpu())
  
imports: import nvidia.dali
  import nvidia.dali.plugin.tf
  import tensorflow
  from .None import ops
label_desc: Use image node_id 2 for calling the YOLOv4Pipeline obj's underlying member method code with example usage: obj._define_pipeline() without return types