code: def test_operator_cast():
      types = [
          np.uint8,
          np.int8,
          np.uint16,
          np.int16,
          np.uint32,
          np.int32,
          np.uint64,
          np.int64,
          np.float16,
          np.float32,
      ]
      for device in ["cpu", "gpu"]:
          for in_type in types:
              for out_type in types:
                  ndim = rng.integers(0, 4)
                  batch_size = rng.integers(1, 11)
                  yield _test_operator_cast, ndim, batch_size, in_type, out_type, device
  
file_path: DALI/dali/test/python/operator_1/test_cast.py
imports: import numpy
  import nvidia.dali.fn
  import nvidia.dali.types
  from nose.tools import nottest
  from nvidia.dali import pipeline_def
  from test_utils import np_type_to_dali
  import itertools
  from nose2.tools import params
label_desc: Use image node_id 6 for calling a global function with example usage: test_operator_cast() without return types