'Register cls as a supported tag type.  It is expected to define cls.tags as a list of tags
that it implements.
If an already-registered type has registered one of those tags, will raise ValueError.
If there are no tags in cls.tags, will also raise ValueError.'

def register(self, cls):

    if (len(cls.tags) == 0):
        raise ValueError('No    tags    specified    for    class    {0}'.format(cls.__name__))
    for tag in cls.tags:
        if (tag in self._mapping):
            other_cls = self._mapping[tag]
            if (cls == other_cls):
                continue
            raise ValueError("Tag    {0}    already    registered    by    class    {1}.    Can't    register    for    class    {2}".format(tag, other_cls.__name__, cls.__name__))
    for t in cls.tags:
        self._mapping[t] = cls
    return cls
