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","."]
docstr: Retreives the data about the offset, name and size of each component
  using the tarfile module, while also filtering out non-file entries
  Intended as a fallback for the gnu tar version (since it is much slower)
docstr_tok: ["Retreives","the","data","about","the","offset",",","name","and","size","of","each","component","using","the","tarfile","module",",","while","also","filtering","out","non-file","entries","Intended","as","a","fallback","for","the","gnu","tar","version","(","since","it","is","much","slower",")"]
code: def _get_data_tarfile(self):
      """Retreives the data about the offset, name and size of each component
      using the tarfile module, while also filtering out non-file entries
      Intended as a fallback for the gnu tar version (since it is much slower)
      """
  
      print(
          "Warning: tar utility not found. Falling back to tarfile."
          + " Processing will most likely take much longer",
          file=sys.stderr,
      )
      farchive = tarfile.open(self.uri)
      for member in iter(farchive):
          if member.type != tarfile.REGTYPE:
              continue
          offset = farchive.fileobj.tell()
          yield offset, member.name, member.size
  
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 9 for calling the IndexCreator obj's underlying member method code with example usage: obj._get_data_tarfile() without return types