def has_valid_checksum(self, number):
        multiple_table_7 = (2, 3, 4, 5, 6, 7)
        multiple_table_9 = (8, 9, 2, 3, 4, 5, 6, 7)
        result = 0

        if len(number) == 7:
            multiple_table = multiple_table_7
        else:
            multiple_table = multiple_table_9

        for i in range(len(number)-1):
            result += int(number[i]) * multiple_table[i]

        result %= 11
        if result == 10:
            result = 0
        if result  == int(number[-1]):
            return True
        else:
            return False
Calculates a checksum with the provided algorithm.
dataset/ETHPy150Open dcramer/django-compositepks/django/contrib/localflavor/pl/forms.py/PLREGONField.has_valid_checksum