code: def read_chunk_index(self, gen):
      index_format = _ChunkWriter.index_format
      index_format_size = _ChunkWriter.index_format_size
      indexfile = os.path.join(
          self.datadir, _INDEX_FILENAME_FORMAT.format(gen)
      )
      with self.fs.open(indexfile, "rb") as ifp:
          idata = ifp.read()
      offset = 0
      while True:
          # TODO: try iter_unpack()
          buf = idata[offset : offset + index_format_size]
  
          if len(buf) != index_format_size:
              break
          data = unpack(index_format, buf)
          offset += index_format_size
          yield data
  
imports: import binascii
  import collections
  import os
  import pickle
  from datetime import datetime
  from struct import calcsize, pack, unpack
  from pfrl.collections.random_access_queue import RandomAccessQueue
label_desc: Use image node_id 2 for calling the _ChunkReader obj's underlying member method code with example usage: obj.read_chunk_index(gen) without return types