code: def verify_environments_match(
      old_env_id: str,
      new_env_id: str,
      seed: int = 1,
      num_actions: int = 1000,
  ):
      """Verifies with two environment ids (old and new) are identical in obs, reward and done
      (except info where all old info must be contained in new info)."""
      old_env = envs.make(old_env_id, disable_env_checker=True)
      new_env = envs.make(new_env_id, disable_env_checker=True)
  
      old_reset_obs, old_info = old_env.reset(seed=seed)
      new_reset_obs, new_info = new_env.reset(seed=seed)
  
      np.testing.assert_allclose(old_reset_obs, new_reset_obs)
  
      for i in range(num_actions):
          action = old_env.action_space.sample()
          (
              old_obs,
              old_reward,
              old_terminated,
              old_truncated,
              old_info,
          ) = old_env.step(action)
          (
              new_obs,
              new_reward,
              new_terminated,
              new_truncated,
              new_info,
          ) = new_env.step(action)
  
          np.testing.assert_allclose(old_obs, new_obs, atol=EPS)
          np.testing.assert_allclose(old_reward, new_reward, atol=EPS)
          np.testing.assert_equal(old_terminated, new_terminated)
          np.testing.assert_equal(old_truncated, new_truncated)
  
          for key in old_info:
              np.testing.assert_allclose(
                  old_info[key], new_info[key], atol=EPS
              )
  
          if old_terminated or old_truncated:
              break
  
file_path: gym/tests/envs/test_mujoco.py
imports: import numpy
  import pytest
  import gym
  from gym import envs
  from gym.envs.registration import EnvSpec
  from tests.envs.utils import mujoco_testing_env_specs
label_desc: Use image node_id 1 for calling a global function with example usage: verify_environments_match(old_env_id, new_env_id, seed, num_actions) without return types