code: def test_tensors_in_tables_pandas_roundtrip_variable_shaped(
      ray_start_regular_shared,
      enable_automatic_tensor_extension_cast,
  ):
      shapes = [(2, 2), (3, 3), (4, 4)]
      cumsum_sizes = np.cumsum(
          [0] + [np.prod(shape) for shape in shapes[:-1]]
      )
      arrs = [
          np.arange(offset, offset + np.prod(shape)).reshape(shape)
          for offset, shape in zip(cumsum_sizes, shapes)
      ]
      outer_dim = len(arrs)
      df = pd.DataFrame(
          {"one": list(range(outer_dim)), "two": TensorArray(arrs)}
      )
      ds = ray.data.from_pandas(df)
      ds = ds.map_batches(
          lambda df: df + 1, batch_size=2, batch_format="pandas"
      )
      ds_df = ds.to_pandas()
      expected_df = df + 1
      if enable_automatic_tensor_extension_cast:
          expected_df.loc[:, "two"] = _create_possibly_ragged_ndarray(
              expected_df["two"].to_numpy()
          )
      pd.testing.assert_frame_equal(ds_df, expected_df)
  
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 12 for calling a global function with example usage: test_tensors_in_tables_pandas_roundtrip_variable_shaped(ray_start_regular_shared, enable_automatic_tensor_extension_cast) without return types