<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def last_code(self):
 """ Return the last escape code in `self.data`. If no escape codes are found, '' is returned. """

        codes = self.data.split(escape_sequence)
        if not codes:
            return ''
        return ''.join((escape_sequence, codes[-1]))