def _check_arguments():
    """
    _check_arguments()
    Retrieves the arguments which describe the file being sent.
    These areguments are the file_sent, the file-info, the sessionid, and optionally

    @return file_info, file_sent, reservation_id, is_async
    """
    file_info = get_argument(FILE_INFO)
    if file_info is None:
        raise FileUploadError(WEBLAB_GENERAL_EXCEPTION_CODE, FILE_INFO % "%s argument not provided!")
    file_sent = request.files.get(FILE_SENT)
    if file_sent is None:
        file_sent = get_argument(FILE_SENT)
        if file_sent is None:
            raise FileUploadError(WEBLAB_GENERAL_EXCEPTION_CODE, "%s argument not provided!" % FILE_SENT)
    else:
        sio = StringIO.StringIO()
        file_sent.save(sio)
        file_sent = sio.getvalue()

    reservation_id = get_argument(RESERVATION_ID)
    if reservation_id is None:
        reservation_id = get_argument(SESSION_ID)
        if reservation_id is None:
            raise FileUploadError(WEBLAB_GENERAL_EXCEPTION_CODE, "%s argument not provided!" % ' or '.join((SESSION_ID, RESERVATION_ID)))

    # Read the IS_ASYNC parameter, which will indicate us whether we should execute the send_file asynchronously
    # or synchronously.
    is_async_str = get_argument(IS_ASYNC)
    if is_async_str is None:
        is_async = False
    else:
        is_async_str = is_async_str.lower()
        if is_async_str in ("true", "yes", "1"):
            is_async = True
        elif is_async_str in ("false", "no", "0"):
            is_async = False
        else:
            raise FileUploadError(WEBLAB_GENERAL_EXCEPTION_CODE, "%s argument is present but not valid (should be a boolean)!" % IS_ASYNC)
    return file_info, file_sent, reservation_id, is_async
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/weblab/core/web/upload.py/_check_arguments/swapped operands of `%`