code: def wds_index_file_pipeline(idx_path, device):
      jpg, cls = fn.readers.webdataset(
          paths=[os.path.join(test_data_root, "data.tar")],
          index_paths=[idx_path],
          ext=["jpg", "cls"],
      )
      if device == "gpu":
          jpg = jpg.gpu()
          cls = cls.gpu()
      return jpg, cls
  
imports: from nvidia.dali import pipeline_def, fn
  import os
  import glob
  from test_utils import get_dali_extra_path
label_desc: Use image node_id 1 for calling a global function with example usage: wds_index_file_pipeline(idx_path, device) and returns: jpg,  cls