async def aget_context(self, query: str) -> List[str]:
        """Invoke and process contexts retrieval.

        Args:
            query: The input to retrieve context for.
        """

        chunks = await self.retriever.aretrieve_chunks(query)

        if self.reranker:
            chunks = await self.reranker.arerank(
                query_text=query, chunks=chunks, chunk_scores=None
            )

        if self.use_parallel:
            # TODO: how to make this deterministic for testing against golden
            # sets?
            tasks = list(
                asyncio.create_task(
                    self.aprocess_chunk_by_tool(
                        chunk_and_score=chunk, tool_num=i
                    )
                )
                for i, chunk in enumerate(chunks)
            )

            results, _ = await asyncio.wait(tasks)

            chunks = list(task.result() for task in results)
        else:
            # Non-parallel but deterministic processing.
            chunks = list(
                self.process_chunk_by_tool(tool_num=i, chunk_and_score=chunk)
                for i, chunk in enumerate(chunks)
            )

        return chunks
Invoke and process contexts retrieval.

        Args:
            query: The input to retrieve context for.
        
examples/dev/dummy_app/app.py