def calc_checksum(number):
    """Calculate the checksum over the number."""
    # convert to numeric first, then sum individual digits
    weights = (1, 2, 1, 2, 1, 2, 4, 1)
    number = ''.join(str(w * int(n)) for w, n in zip(weights, number))
    return sum(int(n) for n in number) % 10