code: def test_pipeline_inputs_exec_pipelined(use_copy_kernel, blocking):
      import torch
      import cupy as cp
  
      rng = default_rng()
      n_iterations = 8
      p = identity_pipe(
          use_copy_kernel,
          blocking,
          exec_pipelined=False,
          exec_async=False,
      )
      p.build()
      for _ in range(n_iterations):
          batch_size = rng.integers(1, max_batch_size)
          random_in = rng.random(size=(batch_size, 4, 6, 2))
          in_list_cpu = [
              rng.integers(
                  low=-max_test_value,
                  high=max_test_value,
                  size=(5, 3, 2),
              )
              for _ in range(batch_size)
          ]
  
          (
              numpy,
              cupy,
              torch_cpu,
              torch_gpu,
              tensor_cpu,
              tensor_gpu,
              out_list_cpu,
          ) = p.run(
              numpy=random_in,
              cupy=cp.array(random_in),
              torch_cpu=torch.Tensor(random_in),
              torch_gpu=torch.Tensor(random_in).cuda(),
              tensor_cpu=TensorCPU(random_in),
              tensor_gpu=TensorGPU(cp.array(random_in)),
              list_cpu=in_list_cpu,
          )
  
          assert np.all(np.isclose(to_array(numpy), random_in))
          assert np.all(np.isclose(to_array(cupy), random_in))
          assert np.all(np.isclose(to_array(torch_cpu), random_in))
          assert np.all(np.isclose(to_array(torch_gpu), random_in))
          assert np.all(np.isclose(to_array(tensor_cpu), random_in))
          assert np.all(np.isclose(to_array(tensor_gpu), random_in))
  
          for ref, tst in zip(in_list_cpu, out_list_cpu):
              assert np.all(np.isclose(to_array(tst), ref))
  
file_path: DALI/dali/test/python/test_pipeline_inputs.py
imports: import numpy
  import nvidia.dali.fn
  from nose.plugins.attrib import attr
  from nose2.tools import params
  from numpy.random import default_rng
  from nvidia.dali import pipeline_def
  from nvidia.dali.tensors import TensorCPU, TensorGPU
  from nose_utils import raises
  from test_utils import to_array
label_desc: Use image node_id 3 for calling a global function with example usage: test_pipeline_inputs_exec_pipelined(use_copy_kernel, blocking) without return types