def getPositionByType(self, tagSet):
try:<EOL><INDENT>return self.__tagToPosMap[tagSet]<EOL><DEDENT>except KeyError:<EOL><INDENT>raise error.PyAsn1Error('<STR_LIT>' % (tagSet,))<EOL><DEDENT>
Return field position by its ASN.1 type.

        Parameters
        ----------
        tagSet: :class:`~pysnmp.type.tag.TagSet`
            ASN.1 tag set distinguishing one ASN.1 type from others.

        Returns
        -------
        : :py:class:`int`
            ASN.1 type position in fields set

        Raises
        ------
        : :class:`~pyasn1.error.PyAsn1Error`
            If *tagSet* is not present or ASN.1 types are not unique within callee *NamedTypes*