'Check Switzerland VAT number.'

def check_vat_ch(self, vat):

    if self.__check_vat_ch_re1.match(vat):
        return True
    match = self.__check_vat_ch_re2.match(vat)
    if match:
        num = filter((lambda s: s.isdigit()), match.group(1))
        factor = (5, 4, 3, 2, 7, 6, 5, 4)
        csum = sum([(int(num[i]) * factor[i]) for i in range(8)])
        check = ((11 - (csum % 11)) % 11)
        return (check == int(num[8]))
    return False
