<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_changes(self):
 """ Return a list of modified records. This is only applicable for attached tables. Returns: A list of `(row_index, record)` tuples of modified records Raises: :class:`delphin.exceptions.ItsdbError`: when called on a detached table """

        if not self.is_attached():
            raise ItsdbError('changes are not tracked for detached tables.')
        return [(i, self[i]) for i, row in enumerate(self._records)
                if row is not None]