def _reconstruct_chunk_list(
    initial_chunks: list, small_chunks: list[str], large_chunk_results: dict
) -> list[str]:
    """Reconstruct the final chunk list maintaining original order."""
    final_chunk_texts = []
    large_chunk_indices = set(large_chunk_results.keys())
    small_chunk_iter = iter(small_chunks)

    for i in range(len(initial_chunks)):
        if i in large_chunk_indices:
            final_chunk_texts.extend(large_chunk_results[i])
        else:
            final_chunk_texts.append(next(small_chunk_iter))

    return final_chunk_texts
Reconstruct the final chunk list maintaining original order.
backend/airweave/platform/transformers/default_file_chunker.py