<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_keys(cls, data):
 """Filter GELF record keys using exclude_patterns :param dict data: Log record has dict :return: the filtered log record :rtype: dict """

        keys = list(data.keys())
        for pattern in cls.EXCLUDE_PATTERNS:
            for key in keys:
                if re.match(pattern, key):
                    keys.remove(key)
        return dict(filter(lambda x: x[0] in keys, data.items()))