code: def _enum_attached_rows(self, indices):
          
          records = self._records
          i = 0
          # first rows covered by the file
          for i, line in self._enum_lines():
              if i in indices:
                  row = records[i]
                  if row is None:
                      row = decode_row(line)
                  yield (i, row)
          # then any uncommitted rows
          for j in range(i, len(records)):
              if j in indices:
                  if records[j] is not None:
                      yield (j, records[j])
docs: Enumerate on-disk and in-memory records.