code: def test_rng_different_at_each_index(
      space: Space, n: int, base_seed: int
  ):
      """
      Tests that the rng values produced at each index are different
      to prevent if the rng is copied for each subspace
      """
      space.seed(base_seed)
  
      batched_space = batch_space(space, n)
      assert space.np_random is not batched_space.np_random
      assert_rng_equal(space.np_random, batched_space.np_random)
  
      batched_sample = batched_space.sample()
      sample = list(iterate(batched_space, batched_sample))
      assert not all(
          np.all(element == sample[0]) for element in sample
      ), sample
  
file_path: gym/tests/vector/test_spaces.py
imports: import copy
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from gym.spaces import Box, Dict, MultiDiscrete, Space, Tuple
  from gym.vector.utils.spaces import batch_space, iterate
  from tests.vector.utils import CustomSpace, assert_rng_equal, custom_spaces, spaces
label_desc: Use image node_id 5 for calling a global function with example usage: test_rng_different_at_each_index(space, n, base_seed) without return types