def validate_actions(action, supported_actions):
    """Ensures the inputed action is supported, raises an exception otherwise."""
    if action not in supported_actions:
        raise ValueError(
            f'Action "{action}" is not supported.'
            " the list of valid actions is: {}".format(", ".join(supported_actions))
        )
    return True