export async function asyncToArray<T>(iterable: AsyncIterable<T>): Promise<T[]> {
for await (const item of iterable) {
result.push(item);
}
return result;
export async function asyncToArrayFlat<T>(iterable: AsyncIterable<T[]>): Promise<T[]> {