def getPositionByType(self, tagSet):
        if not self.__tagToPosIdx:
            idx = self.__namedTypesLen
            while idx > 0:
                idx = idx - 1
                tagMap = self.__namedTypes[idx].getType().getTagMap()
                for t in tagMap.getPosMap():
                    if t in self.__tagToPosIdx:
                        raise error.PyAsn1Error('Duplicate type %s' % (t,))
                    self.__tagToPosIdx[t] = idx
        try:
            return self.__tagToPosIdx[tagSet]
        except __HOLE__:
            raise error.PyAsn1Error('Type %s not found' % (tagSet,))
dataset/ETHPy150Open CouchPotato/CouchPotatoServer/libs/pyasn1/type/namedtype.py/NamedTypes.getPositionByType