def guess_entity_type(self, entity_id: EntityId) -> Optional[EntityType]:
        r"""Guess :class:`~.entity.EntityType` from the given
        :class:`~.entity.EntityId`.  It could return :const:`None` when it
        fails to guess.

        .. note::

           It always fails to guess when :attr:`entity_type_guess`
           is configued to :const:`False`.

        :return: The guessed :class:`~.entity.EntityId`, or :const:`None`
                 if it fails to guess.
        :rtype: :class:`~typing.Optional`\ [:class:`~.entity.EntityType`]

        .. versionadded:: 0.2.0

        """
        if not self.entity_type_guess:
            return None
        if entity_id[0] == 'Q':
            return EntityType.item
        elif entity_id[0] == 'P':
            return EntityType.property
        return None