<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_dirty(self) -> bool: """ Are there uncommitted changes? """

        if len(self._transactions) == 0:
            raise RuntimeError("is_dirty called outside a transaction.")
        if len(self._transactions[-1]) > 0:
            return True
        return False