code: def test_cond_pipe():
      @pipeline_def(
          batch_size=10,
          device_id=0,
          num_threads=4,
          enable_conditionals=True,
      )
      def cond_pipe():
          enc, label = fn.readers.file(
              files=[
                  str(
                      _test_root
                      / "db/single/jpeg/113/snail-4291306_1280.jpg"
                  )
              ],
              name="FileReader",
          )
          imgs = fn.decoders.image(enc, device="mixed")
          resized = fn.crop(imgs, crop=[224, 224])
          if fn.random.uniform(range=[0, 1]) < 0.25:
              out = fn.rotate(
                  resized, angle=fn.random.uniform(range=[30, 60])
              )
          else:
              out = resized
          expect_data_node(enc, label, imgs, resized, out, label.gpu())
          return out, label.gpu()
  
      pipe = cond_pipe()
      expect_pipeline(pipe)
      pipe.build()
      imgs, labels = pipe.run()
      expect_tensor_list(imgs, labels)
      assert isinstance(imgs, tensors.TensorListGPU)
      assert imgs.dtype == types.DALIDataType.UINT8  # noqa: E721
      assert isinstance(labels, tensors.TensorListGPU)
  
imports: from pathlib import Path
  import numpy
  from typing import cast, Sequence, Union
  from nvidia.dali import fn, ops
  from nvidia.dali import types, tensors
  from nvidia.dali.data_node import DataNode
  from nvidia.dali.pipeline import pipeline_def, Pipeline
  from test_utils import get_dali_extra_path, check_numba_compatibility_cpu
  from nose.plugins.attrib import attr
label_desc: Use image node_id 8 for calling a global function with example usage: test_cond_pipe() and returns: out,  label