##### SUMMARY

We should probably render something a bit nicer with invalid key/value data, especially because items2dict/dict2items are fairly unintuitive functions. Probably something that briefly explains what the purpose of key/value are so the user can get them right.

##### ISSUE TYPE
- Bug Report

##### ANSIBLE VERSION
devel

##### COMPONENT NAME

plugins.filter.core
uuid_namespace = namespace
    if not isinstance(uuid_namespace, uuid.UUID):
        try:
            uuid_namespace = uuid.UUID(namespace)
        except (AttributeError, ValueError) as e:
            raise AnsibleFilterError("Invalid value '%s' for 'namespace': %s" % (to_native(namespace), to_native(e)))
    
    return to_text(uuid.uuid5(uuid_namespace, to_native(string, errors='surrogate_or_strict')))
def mandatory(a, msg=None):
    from jinja2.runtime import Undefined
    ''' Make a variable mandatory '''
    if isinstance(a, Undefined):
        if a._undefined_name is not None:
            name = "'%s' " % to_text(a._undefined_name)
        else:
            name = ''
        if msg is not None:
            raise AnsibleFilterError(to_native(msg))
        else:
            raise AnsibleFilterError("Mandatory variable %s not defined." % name)
    return a
def combine(*terms, **kwargs):