code: def _count_all_chunks(self):
      gen = 0
      while True:
          indexfile = os.path.join(
              self.datadir, _INDEX_FILENAME_FORMAT.format(gen)
          )
          datafile = os.path.join(
              self.datadir, _DATA_FILENAME_FORMAT.format(gen)
          )
          if self.fs.exists(indexfile) and self.fs.exists(datafile):
              count = len(list(self.read_chunk_index(gen)))
              yield gen, count
              gen += 1
              continue
          break
  
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 4 for calling the _ChunkReader obj's underlying member method code with example usage: obj._count_all_chunks() without return types