'Calculates a checksum with the provided algorithm.'

def has_valid_checksum(self, number):

    weights = ((8, 9, 2, 3, 4, 5, 6, 7, (-1)), (2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8, (-1)), (8, 9, 2, 3, 4, 5, 6, 7, (-1), 0, 0, 0, 0, 0))
    weights = [table for table in weights if (len(table) == len(number))]
    for table in weights:
        checksum = sum([(int(n) * w) for (n, w) in zip(number, table)])
        if ((checksum % 11) % 10):
            return False
    return bool(weights)
