async def query(self, ctx: Context, ev: StartEvent) -> t.Optional[StopEvent]:
        """
        Query step.

        Args:
            ctx (Context): context
            ev (StartEvent): start event

        Returns:
            StopEvent | None: stop event with result

        """
        query_str: t.Optional[str] = ev.get("query_str")

        if query_str is None:
            return None

        query_eng: RetrieverQueryEngine = ctx.data.get("query_eng")

        result = query_eng.query(query_str)
        return StopEvent(result=result)

        Query step.

        Args:
            ctx (Context): context
            ev (StartEvent): start event

        Returns:
            StopEvent | None: stop event with result

        
llama-index-packs/llama-index-packs-longrag/llama_index/packs/longrag/base.py