def METHOD_NAME(flags: Iterable[bool], names: Iterable[str]) -> None:
    """Check if only one flag is set with exclusive flags.
    Raise a CommandError if not.
    Args:
        flags: The flag values to check.
        names: A list of names (corresponding to the flags argument).
    """
    if sum(1 for e in flags if e) > 1:
        argstr = '/'.join('-' + e for e in names)
        raise CommandError("Only one of {} can be given!".format(argstr))