code: def create_dali_pipe(
      channel_first, seq_len, interp, dtype, w, h, batch_size=2
  ):
      pipe = dali.pipeline.Pipeline(batch_size, 1, 0, 0)
      with pipe:
          layout = "FCHW" if channel_first else "FHWC"
          ext = fn.external_source(
              GetSequences(channel_first, seq_len, batch_size),
              layout=layout,
          )
          resize_cpu_out = fn.resize(
              ext,
              resize_x=w,
              resize_y=h,
              interp_type=interp,
              dtype=dtype,
              save_attrs=True,
          )
          resize_gpu_out = fn.resize(
              ext.gpu(),
              resize_x=w,
              resize_y=h,
              interp_type=interp,
              minibatch_size=4,
              dtype=dtype,
              save_attrs=True,
          )
          dali_resized_cpu, size_cpu = resize_cpu_out
          dali_resized_gpu, size_gpu = resize_gpu_out
          # extract just HW part from the input shape
          ext_size = fn.slice(
              fn.cast(fn.shapes(ext), dtype=types.INT32),
              2 if channel_first else 1,
              2,
              axes=[0],
          )
          pipe.set_outputs(
              dali_resized_cpu,
              dali_resized_gpu,
              ext_size,
              size_cpu,
              size_gpu,
          )
      return pipe
  
file_path: DALI/dali/test/python/operator_2/test_resize_seq.py
imports: import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.types
  import numpy
  import os.path
  from test_utils import check_batch
  import PIL.Image
label_desc: Use image node_id 5 for calling a global function with example usage: create_dali_pipe(channel_first, seq_len, interp, dtype, w, h, batch_size) and returns: pipe