def _check_job_wait_args(arguments):

    wait = arguments.wait
    phase = arguments.phase

    if wait is None and phase is not None:
        raise RuntimeError("Additional phase for 'job show' only allowed in combination with 'wait'-keyword.")

    if phase:
        if UWS.models.JobPhases.active_phases in phase.upper():
            phase = phase.upper();
        else:
            active_phases = ', '.join(UWS.models.JobPhases.active_phases)
            raise RuntimeError("Phase '" + phase + "' is not supported with WAIT keyword, choose one of the active phases: " + active_phases)

    return wait, phase


# checks validity of arguments and returns a list of arguments
dataset/ETHPy150Open aipescience/uws-client/uws/cli/main.py/_check_job_wait_args/swapped operands of `in`