import click


def mutually_exclusive(context, param, value):
    """ Callback for command options --overwrite-existing-credentials and --skip-access-keys-setup mutual exclusivity verification. """
    me_option = {
        "overwrite_existing_credentials": "skip_access_keys_setup",
        "skip_access_keys_setup": "overwrite_existing_credentials"
    }

    if value and context.params.get(me_option[param.name], False):
        raise click.BadOptionUsage(option_name=param,
                                   message=(f"Option {param.opts[0]} is mutually exclusive"
                                            f" with option --{me_option[param.name].replace('_', '-')}."),
                                   ctx=context)

    return value