'Build a list-id string from an instance.
Raises ``UnregisteredTypeError`` if there is no registered handler for
the instance type. Raises ``AssertionError`` if a valid list-id string
cannot be generated from the values returned by the type handler.'

def __call__(self, instance):

    try:
        handler = self.__type_handlers[type(instance)]
    except KeyError:
        raise self.UnregisteredTypeError('Cannot    generate    mailing    list    identifier    for    {!r}'.format(instance))
    label = '.'.join(map(six.binary_type, handler(instance)))
    assert is_valid_dot_atom(label)
    return '{}.{}'.format(label, self.__namespace)
