'Create a *TagMap* object from tags and types recursively.
Create a new :class:`~pyasn1.type.tagmap.TagMap` object by
combining tags from *TagMap* objects of children types and
associating them with their immediate child type.
Example
.. code-block:: python
OuterType ::= CHOICE {
innerType INTEGER
Calling *.getTagMap()* on *OuterType* will yield a map like this:
.. code-block:: python
Integer.tagSet -> Choice
Parameters
unique: :py:class:`bool`
If `True`, duplicate *TagSet* objects occurring while building
new *TagMap* would cause error.
Returns
: :class:`~pyasn1.type.tagmap.TagMap`
New *TagMap* holding *TagSet* object gathered from childen types.'

def getTagMap(self, unique=False):

    if (unique not in self.__tagMap):
        presentTypes = {}
        skipTypes = {}
        defaultType = None
        for namedType in self.__namedTypes:
            tagMap = namedType.asn1Object.tagMap
            for tagSet in tagMap:
                if (unique and (tagSet in presentTypes)):
                    raise error.PyAsn1Error(('Non-unique    tagSet    %s' % (tagSet,)))
                presentTypes[tagSet] = namedType.asn1Object
            skipTypes.update(tagMap.skipTypes)
            if (defaultType is None):
                defaultType = tagMap.defaultType
            elif (tagMap.defaultType is not None):
                raise error.PyAsn1Error(('Duplicate    default    ASN.1    type    at    %s' % (self,)))
        self.__tagMap[unique] = tagmap.TagMap(presentTypes, skipTypes, defaultType)
    return self.__tagMap[unique]
