code: def test_remote(ray_start_regular_shared):
      it = from_iterators([[0, 1], [3, 4], [5, 6, 7]])
      assert it.num_shards() == 3
  
      @ray.remote
      def get_shard(it, i):
          return list(it.get_shard(i))
  
      assert ray.get(get_shard.remote(it, 0)) == [0, 1]
      assert ray.get(get_shard.remote(it, 1)) == [3, 4]
      assert ray.get(get_shard.remote(it, 2)) == [5, 6, 7]
  
      @ray.remote
      def check_remote(it):
          assert ray.get(get_shard.remote(it, 0)) == [0, 1]
          assert ray.get(get_shard.remote(it, 1)) == [3, 4]
          assert ray.get(get_shard.remote(it, 2)) == [5, 6, 7]
  
      ray.get(check_remote.remote(it))
  
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 30 for calling a global function with example usage: test_remote(ray_start_regular_shared) and returns: list