def ssn_checksum(number: str) -> int:
    """
    Calculate the checksum for the romanian SSN (CNP).
    """
    weights = (2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9)
    check = sum(w * int(n) for w, n in zip(weights, number)) % 11
    return 1 if check == 10 else check

    Calculate the checksum for the romanian SSN (CNP).
    
faker/providers/ssn/ro_RO/__init__.py