async def abuild_localised_splits(
        self,
        chunks: List[str],
        show_progress: bool = False,
    ) -> List[Dict[str, str]]:
        """Async version: batch all LLM calls for each chunk via run_jobs."""
        half_window = self.window_size // 2

        # prepare one achat() coroutine per chunk
        jobs = []
        for i, chunk in enumerate(chunks):
            start = max(0, i - half_window)
            end = min(len(chunks), i + half_window + 1)
            window_chunk = " ".join(chunks[start:end])

            llm_messages = [
                ChatMessage(role="system", content=CONTEXT_GENERATION_SYSTEM_PROMPT),
                ChatMessage(
                    role="user",
                    content=CONTEXT_GENERATION_USER_PROMPT.format(
                        window_chunk=window_chunk, chunk=chunk
                    ),
                ),
            ]
            jobs.append(self.llm.achat(messages=llm_messages))

        # run them up to a maximum of llm_workers at once, get ordered responses
        responses = await run_jobs(
            jobs=jobs,
            workers=self.llm_workers,
            show_progress=show_progress,
            desc="Generating local contexts",
        )

        # reassemble into the split format
        return [
            {"text": chunks[i], "context": str(resp)}
            for i, resp in enumerate(responses)
        ]
Async version: batch all LLM calls for each chunk via run_jobs.
llama-index-integrations/node_parser/llama-index-node-parser-slide/llama_index/node_parser/slide/base.py