code: def complex_nested_array():
      return pa.UnionArray.from_sparse(
          pa.array([0, 1] * 500, type=pa.int8()),
          [
              pa.array(
                  [
                      {
                          "a": i % 2 == 0,
                          "b": i,
                          "c": "bar",
                      }
                      for i in range(1000)
                  ]
              ),
              pa.array(
                  [
                      [
                          (key, item)
                          for key, item in zip("abcdefghij", range(10))
                      ]
                      for _ in range(1000)
                  ],
                  type=pa.map_(pa.string(), pa.int64()),
              ),
          ],
      )
  
imports: import logging
  import os
  import sys
  from unittest import mock
  import numpy
  import pyarrow
  import pyarrow.parquet
  import pytest
  from packaging.version import parse
  from pytest_lazyfixture import lazy_fixture
  import ray
  import ray.cloudpickle
  from ray._private.arrow_serialization import _align_bit_offset, _bytes_for_bits, _copy_bitpacked_buffer_if_needed, _copy_buffer_if_needed, _copy_normal_buffer_if_needed, _copy_offsets_buffer_if_needed
  from ray._private.utils import _get_pyarrow_version
  from ray.data.extensions.tensor_extension import ArrowTensorArray, ArrowVariableShapedTensorArray
  from ray.tests.conftest import *
label_desc: Use image node_id 32 for calling a global function with example usage: complex_nested_array() and returns: pa