code: def test_ragged_tensors(ray_start_regular_shared):
      """Test Arrow type promotion between ArrowTensorType and
      ArrowVariableShapedTensorType when a column contains ragged tensors.
      """
      import numpy as np
  
      ds = ray.data.from_items(
          [
              {"spam": np.zeros((32, 32, 5))},
              {"spam": np.zeros((64, 64, 5))},
          ]
      )
      new_type = ds.schema().types[0].scalar_type
      assert ds.schema().types == [
          ArrowVariableShapedTensorType(dtype=new_type, ndim=3),
      ]
  
imports: import time
  import numpy
  import pandas
  import pyarrow
  import pytest
  import ray
  from ray.air.util.tensor_extensions.utils import _create_possibly_ragged_ndarray
  from ray.data.block import BlockAccessor
  from ray.data.extensions.tensor_extension import ArrowTensorArray, ArrowTensorType, ArrowVariableShapedTensorArray, ArrowVariableShapedTensorType, TensorArray, TensorDtype
  from ray.data.tests.conftest import *
  from ray.data.tests.util import extract_values
  from ray.tests.conftest import *
label_desc: Use image node_id 22 for calling a global function with example usage: test_ragged_tensors(ray_start_regular_shared) without return types