def is_in_list(item, list_, kind):
    """Check whether an item is in a list; kind is just a string."""
    if item not in list_:
        raise KeyError(f"Specify {kind} from {list_}: got {item}")
    return True