<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _enum_attached_rows(self, indices):
 """Enumerate on-disk and in-memory records."""

        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])