code: def test_different_components():
      num_samples = 1000
      tar_file_path = os.path.join(
          get_dali_extra_path(), "db/webdataset/MNIST/scrambled.tar"
      )
      index_file = generate_temp_index_file(tar_file_path)
  
      extract_dir = generate_temp_extract(tar_file_path)
      equivalent_files = glob(extract_dir.name + "/*")
      equivalent_files = sorted(
          equivalent_files,
          key=(lambda s: int(s[s.rfind("/") + 1 : s.rfind(".")])),
      )  # noqa: 203
  
      compare_pipelines(
          webdataset_raw_pipeline(
              tar_file_path,
              index_file.name,
              ["jpg", "txt;cls"],
              batch_size=test_batch_size,
              device_id=0,
              num_threads=1,
          ),
          file_reader_pipeline(
              equivalent_files,
              ["jpg", {"txt", "cls"}],
              batch_size=test_batch_size,
              device_id=0,
              num_threads=1,
          ),
          test_batch_size,
          math.ceil(num_samples / test_batch_size),
      )
  
imports: import os
  from glob import glob
  import math
  import nvidia.dali
  from test_utils import compare_pipelines, get_dali_extra_path
  from nose_utils import assert_raises
  from nose.tools import assert_equal
  from webdataset_base import generate_temp_extract, generate_temp_index_file, webdataset_raw_pipeline, file_reader_pipeline
  from webdataset_base import test_batch_size
label_desc: Use image node_id 4 for calling a global function with example usage: test_different_components() without return types