def no_duplicate_values(data, key):
    """
    Check if a dict (list) has duplicate keys (elements).
    If the input is a list of dictionaries, this will check
    the "label" attribute by default
    >>> no_duplicate_values({"intents": ["a", "a"]}, "intents")
    False
    >>> no_duplicate_values({"intents": ["a"]}, "intents")
    True
    >>> no_duplicate_values({"entities": {"a": []}}, "entities")
    True
    >>> no_duplicate_values({"entities": {"a": []}, "b": []}, "entities")
    True
    """
    obj = data.get(key, [])
    return sorted(obj) == sorted(set(obj))