code: def test_tensors_shuffle(ray_start_regular_shared):
      # Test Arrow table representation.
      tensor_shape = (3, 5)
      ds = ray.data.range_tensor(6, shape=tensor_shape)
      shuffled_ds = ds.random_shuffle()
      shuffled = extract_values("data", shuffled_ds.take())
      base = extract_values("data", ds.take())
      np.testing.assert_raises(
          AssertionError,
          np.testing.assert_equal,
          shuffled,
          base,
      )
      np.testing.assert_equal(
          sorted(shuffled, key=lambda arr: arr.min()),
          sorted(base, key=lambda arr: arr.min()),
      )
  
      # Test Pandas table representation.
      tensor_shape = (3, 5)
      ds = ray.data.range_tensor(6, shape=tensor_shape)
      ds = ds.map_batches(lambda df: df, batch_format="pandas")
      shuffled_ds = ds.random_shuffle()
      shuffled = extract_values("data", shuffled_ds.take())
      base = extract_values("data", ds.take())
      np.testing.assert_raises(
          AssertionError,
          np.testing.assert_equal,
          shuffled,
          base,
      )
      np.testing.assert_equal(
          sorted(shuffled, key=lambda arr: arr.min()),
          sorted(base, key=lambda arr: arr.min()),
      )
  
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 4 for calling a global function with example usage: test_tensors_shuffle(ray_start_regular_shared) without return types