class_docstr: Reads `RecordIO` data format, and creates index file
  that enables random access.
  
  Example usage:
  ----------
  >>> creator = IndexCreator('data/test.rec','data/test.idx')
  >>> creator.create_index()
  >>> creator.close()
  >>> !ls data/
  test.rec  test.idx
  
  Parameters
  ----------
  uri : str
      Path to the record file.
  idx_path : str
      Path to the index file, that will be created/overwritten.
  key_type : type
      Data type for keys (optional, default = int).
docstr: Creates the index file from open record file
          
docstr_tok: ["Creates","the","index","file","from","open","record","file"]
code: def create_index(self):
      """Creates the index file from open record file"""
      self.reset()
      counter = 0
      pre_time = time.time()
      while True:
          if counter % 1000 == 0:
              cur_time = time.time()
              print("time:", cur_time - pre_time, " count:", counter)
          pos = self.tell()
          cont = self.read()
          if cont is None:
              break
          key = self.key_type(counter)
          self.fidx.write(f"{str(key)}\t{pos}\n")
          counter = counter + 1
  
file_path: mxnet/tools/rec2idx.py
imports: from __future__ import print_function
  import os
  import time
  import ctypes
  from mxnet.base import _LIB
  from mxnet.base import check_call
  import mxnet
  import argparse
label_desc: Use image node_id 5 for calling the IndexCreator obj's underlying member method code with example usage: obj.create_index() without return types