code: def _test_wds_properties(device, generate_index):
      root_path = os.path.join(
          get_dali_extra_path(), "db/webdataset/MNIST/devel-0.tar"
      )
      ref_filenames = [
          "2000.jpg",
          "2001.jpg",
          "2002.jpg",
          "2003.jpg",
          "2004.jpg",
          "2005.jpg",
          "2006.jpg",
          "2007.jpg",
      ]
      ref_indices = [1536, 4096, 6144, 8704, 11264, 13824, 16384, 18432]
      if generate_index:
          with tempfile.TemporaryDirectory() as idx_dir:
              index_paths = [
                  os.path.join(
                      idx_dir, os.path.basename(root_path) + ".idx"
                  )
              ]
              generate_wds_index(root_path, index_paths[0])
              p = wds_properties(
                  root_path,
                  device,
                  index_paths,
                  batch_size=8,
                  num_threads=4,
                  device_id=0,
              )
              p.build()
              output = p.run()
      else:
          p = wds_properties(
              root_path,
              device,
              None,
              batch_size=8,
              num_threads=4,
              device_id=0,
          )
          p.build()
          output = p.run()
      for out in output:
          out = out if device == "cpu" else out.as_cpu()
          for source_info, ref_fname, ref_idx in zip(
              out, ref_filenames, ref_indices
          ):
              assert (
                  _uint8_tensor_to_string(source_info)
                  == f"{root_path}:{ref_idx}:{ref_fname}"
              )
  
imports: from nvidia.dali import pipeline_def
  import os
  import numpy
  from nvidia.dali import fn
  from test_utils import get_dali_extra_path
  from nose_utils import raises
  import tempfile
label_desc: Use image node_id 7 for calling a global function with example usage: _test_wds_properties(device, generate_index) without return types