code: def test_batch_across_shards(ray_start_regular_shared):
      it = from_iterators([[0, 1], [2, 3]])
      it = it.batch_across_shards()
      assert (
          repr(it)
          == "LocalIterator[ParallelIterator[from_iterators[shards=2]]"
          ".batch_across_shards()]"
      )
      assert sorted(it) == [[0, 2], [1, 3]]
  
imports: import sys
  import time
  import collections
  from collections import Counter
  import pytest
  import ray
  from ray.util.iter import from_items, from_iterators, from_range, from_actors, ParallelIteratorWorker, LocalIterator
  from ray._private.test_utils import Semaphore
label_desc: Use image node_id 29 for calling a global function with example usage: test_batch_across_shards(ray_start_regular_shared) without return types