def get_mutually_exclusive_required_option(options, *selections):
    """
    Validates that exactly one of the 2 given options is specified.
    Returns the name of the found option.
    """

    selected = [sel for sel in selections if options.get(sel)]
    if len(selected) != 1:
        selection_string = ', '.join(f'--{selection}' for selection in selections)

        raise CommandError(f'Must specify exactly one of {selection_string}')
    return selected[0]