def curp_checksum(characters: str) -> int:
    """
    Calculate the checksum for the mexican CURP.
    """
    start = 18
    return -sum((start - i) * CURP_CHARACTERS.index(n) for i, n in enumerate(characters)) % 10

    Calculate the checksum for the mexican CURP.
    
faker/providers/ssn/es_MX/__init__.py