code: def do_map_batches(data):
      ds = ray.data.range(1)
      ds = ds.map_batches(lambda x: {"output": data})
      return ds.take_batch()["output"]
  
imports: import numpy
  import pytest
  import torch
  import ray
  from ray.air.util.tensor_extensions.utils import create_ragged_ndarray
  from ray.data.tests.conftest import *
  from ray.tests.conftest import *
label_desc: Use image node_id 1 for calling a global function with example usage: do_map_batches(data) and returns: ds