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

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

        chunks = self.retriever.retrieve_chunks(query)

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

        if self.use_parallel:
            # Creates a few threads to process chunks in parallel to test apps
            # that make use of threads.
            ex = ThreadPoolExecutor(max_workers=max(1, len(chunks)))

            futures = list(
                ex.submit(
                    self.process_chunk_by_tool,
                    chunk_and_score=chunk,
                    tool_num=i,
                )
                for i, chunk in enumerate(chunks)
            )

            wait(futures)
            chunks = list(future.result() for future in futures)
        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