'Return |ASN.1| type component value by position.
Equivalent to Python sequence subscription operation (e.g. `[]`).
Parameters
idx : :class:`int`
Component index (zero-based). Must either refer to an existing
component or to N+1 component (of *componentType is set). In the latter
case a new component type gets instantiated and appended to the |ASN.1|
sequence.
Returns
: :py:class:`~pyasn1.type.base.PyAsn1Item`
a pyasn1 object'

def getComponentByPosition(self, idx):

    try:
        return self._componentValues[idx]
    except IndexError:
        self.setComponentByPosition(idx)
        return self._componentValues[idx]
