code: def test_arrow_scalar_conversion(ray_start_regular_shared):
      ds = ray.data.from_items([1])
  
      def fn(batch: list):
          return {"id": np.array([1])}
  
      ds = ds.map_batches(fn)
      res = ds.take()
      assert res == [{"id": 1}], res
  
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 35 for calling a global function with example usage: test_arrow_scalar_conversion(ray_start_regular_shared) and returns: dict