code: def getComponentByType(self, tagSet, default=noValue,
                             instantiate=True, innerFlag=False):
          
          componentValue = self.getComponentByPosition(
              self.componentType.getPositionByType(tagSet),
              default=default, instantiate=instantiate
          )
          if innerFlag and isinstance(componentValue, Set):
              # get inner component by inner tagSet
              return componentValue.getComponent(innerFlag=True)
          else:
              # get outer component by inner tagSet
              return componentValue
docs: Returns |ASN.1| type component by ASN.1 tag.
  
          Parameters
          ----------
          tagSet : :py:class:`~pyasn1.type.tag.TagSet`
              Object representing ASN.1 tags to identify one of
              |ASN.1| object component
  
          Keyword Args
          ------------
          default: :class:`object`
              If set and requested component is a schema object, return the `default`
              object instead of the requested component.
  
          instantiate: :class:`bool`
              If `True` (default), inner component will be automatically instantiated.
              If 'False' either existing component or the `noValue` object will be
              returned.
  
          Returns
          -------
          : :py:class:`~pyasn1.type.base.PyAsn1Item`
              a pyasn1 object