code: def test_complex_ragged_arrays(ray_start_regular_shared):
      data = [[{"a": 1}, {"a": 2}, {"a": 3}], [{"b": 1}]]
      output = do_map_batches(data)
      assert_structure_equals(output, create_ragged_ndarray(data))
  
      data = [
          "hi",
          1,
          None,
          [[[[]]]],
          {"a": [[{"b": 2, "c": UserObj()}]]},
          UserObj(),
      ]
      output = do_map_batches(data)
      assert_structure_equals(output, create_ragged_ndarray(data))
  
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 18 for calling a global function with example usage: test_complex_ragged_arrays(ray_start_regular_shared) without return types