code: def test_random_shuffle(
      self, ray_start_regular_shared, restore_data_context
  ):
      # NOTE: set preserve_order to True to allow consistent output behavior.
      context = ray.data.DataContext.get_current()
      context.execution_options.preserve_order = True
  
      dir_path = "s3://anonymous@air-example-data/mnist"
      file_paths = [f"{i:05d}.png" for i in range(10)]
      input_uris = [
          f"{dir_path}/{file_path}" for file_path in file_paths
      ]
  
      ds = ray.data.read_images(
          paths=input_uris,
          include_paths=True,
          shuffle="files",
      )
  
      # Execute 10 times to get a set of output paths.
      output_paths_list = []
      for _ in range(10):
          paths = [
              row["path"][-len(file_paths[0]) :]
              for row in ds.take_all()
          ]
          output_paths_list.append(paths)
      all_paths_matched = [
          file_paths == output_paths
          for output_paths in output_paths_list
      ]
  
      # Check when shuffle is enabled, output order has at least one different
      # case.
      assert not all(all_paths_matched)
      # Check all files are output properly without missing one.
      assert all(
          [
              file_paths == sorted(output_paths)
              for output_paths in output_paths_list
          ]
      )
  
imports: import os
  import tempfile
  from typing import Dict
  import numpy
  import pyarrow
  import pytest
  from fsspec.implementations.local import LocalFileSystem
  from PIL import Image
  import ray
  from ray.data.datasource import Partitioning
  from ray.data.datasource.file_meta_provider import FastFileMetadataProvider
  from ray.data.datasource.image_datasource import ImageDatasource, _ImageFileMetadataProvider
  from ray.data.extensions import ArrowTensorType
  from ray.data.tests.conftest import *
  from ray.data.tests.mock_http_server import *
  from ray.tests.conftest import *
label_desc: Use image node_id 12 for calling the TestReadImages obj's underlying member method code with example usage: obj.test_random_shuffle(ray_start_regular_shared, restore_data_context) without return types