def METHOD_NAME(cls, patron):
    """Raise an exception unless the patron currently has borrowing
    privileges.
    :raises AuthorizationExpired: If the patron's authorization has expired.
    :raises OutstandingFines: If the patron has too many outstanding fines.
    """
    if not cls.authorization_is_active(patron):
        # The patron's card has expired.
        raise AuthorizationExpired()
    if cls.has_excess_fines(patron):
        raise OutstandingFines()
    from api.authenticator import PatronData
    if patron.block_reason is not None:
        if patron.block_reason is PatronData.EXCESSIVE_FINES:
            # The authentication mechanism itself may know that
            # the patron has outstanding fines, even if the circulation
            # manager is not configured to make that deduction.
            raise OutstandingFines()
        raise AuthorizationBlocked()