code: def _test_lambda_np_readfromfile(name, py_callback_pickler):
      data_root = get_dali_extra_path()
      images_dir = os.path.join(data_root, "db", "single", "jpeg")
  
      with open(os.path.join(images_dir, "image_list.txt"), "r") as f:
          file_label = [
              line.rstrip().split(" ") for line in f if line != ""
          ]
          files, _ = zip(*file_label)
  
      _create_and_compare_simple_pipelines(
          lambda x: (
              np.fromfile(
                  os.path.join(
                      images_dir, files[x.idx_in_epoch % len(files)]
                  ),
                  dtype=np.uint8,
              )
          ),
          py_callback_pickler,
          batch_size=8,
          py_num_workers=2,
      )
  
imports: import copyreg
  import numpy
  import nvidia.dali.fn
  import nvidia.dali.pickling
  import os
  from nvidia.dali import pipeline_def
  from pickle import PicklingError
  from nose_utils import raises
  from test_utils import get_dali_extra_path, restrict_python_version
label_desc: Use image node_id 33 for calling a global function with example usage: _test_lambda_np_readfromfile(name, py_callback_pickler) without return types