def METHOD_NAME(interrupt: Value):
    """Check if cancel & pause exception should be raised."""
    if not interrupt:
        return
    if interrupt.value == ScanJob.JOB_TERMINATE_CANCEL:
        raise NetworkCancelException()
    if interrupt.value == ScanJob.JOB_TERMINATE_PAUSE:
        raise NetworkPauseException()