code: def test_multidiscrete_subspace_reproducibility():
      # 1D multi-discrete
      space = MultiDiscrete([100, 200, 300])
      space.seed()
  
      assert data_equivalence(space[0].sample(), space[0].sample())
      assert data_equivalence(space[0:1].sample(), space[0:1].sample())
      assert data_equivalence(space[0:2].sample(), space[0:2].sample())
      assert data_equivalence(space[:].sample(), space[:].sample())
      assert data_equivalence(space[:].sample(), space.sample())
  
      # 2D multi-discrete
      space = MultiDiscrete([[300, 400, 500], [600, 700, 800]])
      space.seed()
  
      assert data_equivalence(
          space[0, 1].sample(), space[0, 1].sample()
      )
      assert data_equivalence(space[0].sample(), space[0].sample())
      assert data_equivalence(space[0:1].sample(), space[0:1].sample())
      assert data_equivalence(
          space[0:2, :].sample(), space[0:2, :].sample()
      )
      assert data_equivalence(
          space[:, 0:1].sample(), space[:, 0:1].sample()
      )
      assert data_equivalence(
          space[0:2, 0:2].sample(), space[0:2, 0:2].sample()
      )
      assert data_equivalence(space[:].sample(), space[:].sample())
      assert data_equivalence(
          space[:, :].sample(), space[:, :].sample()
      )
      assert data_equivalence(space[:, :].sample(), space.sample())
  
imports: import pytest
  from gym.spaces import Discrete, MultiDiscrete
  from gym.utils.env_checker import data_equivalence
label_desc: Use image node_id 2 for calling a global function with example usage: test_multidiscrete_subspace_reproducibility() without return types