code: def generate_temp_index_file(tar_file_path):
      global wds2idx_script
      temp_index_file = tempfile.NamedTemporaryFile()
      assert_equal(
          call(
              [wds2idx_script, tar_file_path, temp_index_file.name],
              stdout=open(os.devnull, "wb"),
          ),
          0,
      )
      return temp_index_file
  
file_path: DALI/dali/test/python/webdataset_base.py
imports: from nvidia.dali import pipeline_def
  from nvidia.dali.fn import readers
  from nose.tools import assert_equal
  import tempfile
  from subprocess import call
  import os
  import tarfile
label_desc: Use image node_id 4 for calling a global function with example usage: generate_temp_index_file(tar_file_path) and returns: temp_index_file