code: def copy_pipe(shape, layout, dev, dtype):
      min_shape = [s // 2 if s > 1 else 1 for s in shape]
      min_shape = tuple(min_shape)
      input = fn.external_source(
          source=RandomlyShapedDataIterator(
              batch_size,
              min_shape=min_shape,
              max_shape=shape,
              dtype=dtype,
          ),
          layout=layout,
      )
      if dev == "gpu":
          input = input.gpu()
      output = fn.copy(input)
      return input, output
  
imports: from nvidia.dali import fn, pipeline_def
  from test_utils import RandomlyShapedDataIterator, to_array
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: copy_pipe(shape, layout, dev, dtype) and returns: input,  output