code: def test_arrow_concat_tensor_extension_uniform():
      # Test tensor column concatenation.
      a1 = np.arange(12).reshape((3, 2, 2))
      t1 = pa.table({"a": ArrowTensorArray.from_numpy(a1)})
      a2 = np.arange(12, 24).reshape((3, 2, 2))
      t2 = pa.table({"a": ArrowTensorArray.from_numpy(a2)})
      ts = [t1, t2]
      out = concat(ts)
      # Check length.
      assert len(out) == 6
      # Check schema.
      assert out.column_names == ["a"]
      assert out.schema.types == [ArrowTensorType((2, 2), pa.int64())]
      # Confirm that concatenation is zero-copy (i.e. it didn't trigger chunk
      # consolidation).
      assert out["a"].num_chunks == 2
      # Check content.
      np.testing.assert_array_equal(out["a"].chunk(0).to_numpy(), a1)
      np.testing.assert_array_equal(out["a"].chunk(1).to_numpy(), a2)
      # Check equivalence.
      expected = pa.concat_tables(ts, promote=True)
      assert out == expected
  
imports: import os
  import numpy
  import pandas
  import pyarrow
  import pytest
  import ray
  from ray.data._internal.arrow_ops.transform_pyarrow import concat, unify_schemas
  from ray.data.block import BlockAccessor
  from ray.data.extensions import ArrowTensorArray, ArrowTensorType, ArrowVariableShapedTensorType
label_desc: Use image node_id 5 for calling a global function with example usage: test_arrow_concat_tensor_extension_uniform() without return types