<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def relookup(self, pattern):
 """ Dictionary lookup with a regular expression. Return pairs whose key matches pattern. """

        key = re.compile(pattern)
        return filter(lambda x : key.match(x[0]), self.data.items())