code: def _batch_iterator(self, N=1):
          
          batch_size = math.ceil(self.num_records / float(N))
          handle = self._open(self.filename)
          while True:
              batch = list(islice(handle, batch_size))
              if not batch:
                  break
              yield batch
docs: Returns N lists of records.
  
          This can be used on any iterator, for example to batch up
          SeqRecord objects from Bio.SeqIO.parse(...), or to batch
          Alignment objects from Bio.AlignIO.parse(...), or simply
          lines from a file handle.
  
          This is a generator function, and it returns lists of the
          entries from the supplied iterator.  Each list will have
          batch_size entries, although the final list may be shorter.