code: def test_strict_default_batch_format(ray_start_regular_shared):
      ds = ray.data.range(1)
  
      @ray.remote
      class Queue:
          def __init__(self):
              self.item = None
  
          def put(self, item):
              old = self.item
              self.item = item
              return old
  
      q = Queue.remote()
  
      assert isinstance(next(iter(ds.iter_batches()))["id"], np.ndarray)
      assert isinstance(ds.take_batch()["id"], np.ndarray)
  
      def f(x):
          ray.get(q.put.remote(x))
          return x
  
      ds.map_batches(f).materialize()
      batch = ray.get(q.put.remote(None))
      assert isinstance(batch["id"], np.ndarray), batch
  
file_path: ray/python/ray/data/tests/test_strict_mode.py
imports: from collections import UserDict
  import numpy
  import pytest
  import ray
  from ray.data.tests.conftest import *
  from ray.tests.conftest import *
label_desc: Use image node_id 5 for calling a global function with example usage: test_strict_default_batch_format(ray_start_regular_shared) and returns: x, old