code: def main(cfg: DALITarredIndexConfig):
      if not INDEX_CREATOR_AVAILABLE:
          logging.error(
              "`wds2idx` is not installed. Please install NVIDIA DALI >= 1.11"
          )
          exit(1)
  
      tar_files = list(glob.glob(os.path.join(cfg.tar_dir, "*.tar")))
  
      index_dir = os.path.join(cfg.tar_dir, "dali_index")
      if not os.path.exists(index_dir):
          os.makedirs(index_dir, exist_ok=True)
  
      index_paths = process_index_path(tar_files, index_dir)
  
      with Parallel(
          n_jobs=cfg.workers, verbose=len(tar_files)
      ) as parallel:
          _ = parallel(
              delayed(build_index)(tarpath, indexfile)
              for tarpath, indexfile in zip(tar_files, index_paths)
          )
  
      logging.info("Finished constructing index files !")
  
file_path: NeMo/scripts/speech_recognition/create_dali_tarred_dataset_index.py
imports: import glob
  import logging
  import os
  from dataclasses import dataclass
  import hydra
  from hydra.core.config_store import ConfigStore
  from joblib import Parallel, delayed
  from omegaconf import MISSING
label_desc: Use image node_id 3 for calling a global function with example usage: main(cfg) without return types