from typing import List


def checksum(digits: List[int]) -> int:
    """
    Calculates and returns a control digit for given list of digits basing on PESEL standard.
    """
    weights_for_check_digit = [9, 7, 3, 1, 9, 7, 3, 1, 9, 7]
    check_digit = 0

    for i in range(0, 10):
        check_digit += weights_for_check_digit[i] * digits[i]

    check_digit %= 10

    return check_digit