def calculate_check_sum(val: str) -> int:
    """Calculate checksum using INN calculation method."""
    weights = [-1, 5, 7, 9, 4, 6, 10, 5, 7]
    checksum = sum(int(v) * w for v, w in zip(val, weights))

    return checksum % 11 % 10
Calculate checksum using INN calculation method.
faker/providers/ssn/uk_UA/__init__.py