def _get_entity_pair(self, entity_id):
        """
        Returns ``(entity, input_entity)`` for the given entity ID.
        """
        entity = self._entities.get(entity_id)
        try:
            input_entity = utils.get_input_peer(entity)
        except TypeError:
            try:
                input_entity = self._client._entity_cache[entity_id]
            except KeyError:
                input_entity = None

        return entity, input_entity
def _get_entity_pair ( self , entity_id ) : entity = self . _entities . get ( entity_id ) try : input_entity = utils . get_input_peer ( entity ) except TypeError : try : input_entity = self . _client . _entity_cache [ entity_id ] except KeyError : input_entity = None return entity , input_entity
Returns ``(entity, input_entity)`` for the given entity ID.