code: def test_scalar_ragged_array_like(ray_start_regular_shared):
      data = [torch.Tensor([1, 2, 3]), torch.Tensor([1, 2])]
      ds = ray.data.range(2, parallelism=1)
      ds = ds.map(lambda x: {"output": data[x["id"]]})
      output = ds.take_batch()["output"]
      assert_structure_equals(
          output,
          np.array(
              [np.array([1, 2, 3]), np.array([1, 2])], dtype=object
          ),
      )
  
      data = [torch.zeros((3, 5, 10)), torch.zeros((3, 8, 8))]
      ds = ray.data.range(2, parallelism=1)
      ds = ds.map(lambda x: {"output": data[x["id"]]})
      output = ds.take_batch()["output"]
      assert_structure_equals(
          output,
          create_ragged_ndarray(
              [np.zeros((3, 5, 10)), np.zeros((3, 8, 8))]
          ),
      )
  
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 17 for calling a global function with example usage: test_scalar_ragged_array_like(ray_start_regular_shared) without return types