code: def test_restore_from_original_order():
      base_iterator = [
          Batch(1, None),
          Batch(0, None),
          Batch(3, None),
          Batch(2, None),
      ]
  
      ordered = list(restore_original_order(iter(base_iterator)))
      idx = [batch.batch_idx for batch in ordered]
      assert idx == [0, 1, 2, 3]
  
file_path: ray/python/ray/data/tests/block_batching/test_iter_batches.py
imports: import itertools
  import queue
  import threading
  import time
  from typing import Iterator, List, Tuple
  import pandas
  import pyarrow
  import pytest
  import ray
  from ray.data._internal.block_batching.interfaces import Batch, BlockPrefetcher
  from ray.data._internal.block_batching.iter_batches import iter_batches, prefetch_batches_locally, restore_original_order
  from ray.data.block import Block, BlockMetadata
label_desc: Use image node_id 3 for calling a global function with example usage: test_restore_from_original_order() without return types