'Return field name by its position in fields set.
Parameters
idx: :py:class:`idx`
Field index
Returns
: :py:class:`str`
Field name
Raises
: :class:`~pyasn1.error.PyAsn1Error`
If given field name is not present in callee *NamedTypes*'

def getNameByPosition(self, idx):

    try:
        return self.__namedTypes[idx].name
    except IndexError:
        raise error.PyAsn1Error('Type    position    out    of    range')
