class_docstr: Reads `Webdataset` data format, and creates index file
  that enables random access.
  
  Example usage:
  ----------
  >> with IndexCreator('data/test.tar','data/test.idx') as ic:
  >>     ic.create_index()
  >> !ls data/
  test.tar  test.idx
  
  Parameters
  ----------
  uri : str
      Path to the archive file.
  idx_path : str
      Path to the index file, that will be created/overwritten.
class_docstr_tok: ["Reads","`","Webdataset","`","data","format",",","and","creates","index","file","that","enables","random","access",".","Example","usage",":","--","--","--","--","--",">",">","with","IndexCreator","(","'data\/test.tar","'",",","'data\/test.idx","'",")","as","ic",":",">",">","ic.create_index","(",")",">",">","!","ls","data\/","test.tar","test.idx","Parameters","--","--","--","--","--","uri",":","str","Path","to","the","archive","file",".","idx_path",":","str","Path","to","the","index","file",",","that","will","be","created\/overwritten","."]
code: def __exit__(self, exc_type, exc_value, exc_traceback):
      self.close()
  
file_path: DALI/tools/wds2idx.py
imports: import argparse
  import os
  import subprocess
  import sys
  import tarfile
  import time
  from shutil import which
label_desc: Use image node_id 3 for calling the IndexCreator obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_value, exc_traceback) without return types