def calc_check_digit(number):
    """Calculate the check digit. The number passed should not have the
    check digit included."""
    digits = [int(c) for c in number]
    checksum = (
        7 * (digits[0] + digits[3] + digits[6]) +
        3 * (digits[1] + digits[4] + digits[7]) +
        9 * (digits[2] + digits[5])
    ) % 10
    return str(checksum)