code: def test_roundtripping(space: Space):
      """Tests if space samples passed to `to_jsonable` and `from_jsonable` produce the original samples."""
      sample_1 = space.sample()
      sample_2 = space.sample()
  
      # Convert the samples to json, dump + load json and convert back to python
      sample_json = space.to_jsonable([sample_1, sample_2])
      sample_roundtripped = json.loads(json.dumps(sample_json))
      sample_1_prime, sample_2_prime = space.from_jsonable(
          sample_roundtripped
      )
  
      # Check if the samples are equivalent
      assert data_equivalence(
          sample_1, sample_1_prime
      ), f"sample 1: {sample_1}, prime: {sample_1_prime}"
      assert data_equivalence(
          sample_2, sample_2_prime
      ), f"sample 2: {sample_2}, prime: {sample_2_prime}"
  
imports: import copy
  import itertools
  import json
  import pickle
  import tempfile
  from typing import List, Union
  import numpy
  import pytest
  from gym.spaces import Box, Discrete, MultiBinary, MultiDiscrete, Space, Text
  from gym.utils import seeding
  from gym.utils.env_checker import data_equivalence
  from tests.spaces.utils import TESTING_FUNDAMENTAL_SPACES, TESTING_FUNDAMENTAL_SPACES_IDS, TESTING_SPACES, TESTING_SPACES_IDS
label_desc: Use image node_id 1 for calling a global function with example usage: test_roundtripping(space) without return types