def compress(self, data_list):
        if data_list:
            try:
                month = int(data_list[0])
            except (ValueError, __HOLE__):
                raise forms.ValidationError(self.error_messages['invalid_month'])
            try:
                year = int(data_list[1])
            except (ValueError, TypeError):
                raise forms.ValidationError(self.error_messages['invalid_year'])
            try:
                day = monthrange(year, month)[1] # last day of the month
            except IllegalMonthError:
                raise forms.ValidationError(self.error_messages['invalid_month'])
            except ValueError:
                raise forms.ValidationError(self.error_messages['invalid_year'])
            return date(year, month, day)
        return None
dataset/ETHPy150Open jumoconnect/openjumo/jumodjango/etc/credit_card_fields.py/ExpiryDateField.compress