code: def test_wrapper_property_forwarding(class_, props):
      env = class_()
      env = NewPropertyWrapper(env, **props)
  
      # If UnknownSpacesEnv, then call reset to define the spaces
      if isinstance(env.unwrapped, UnknownSpacesEnv):
          _ = env.reset()
  
      # Test the properties set by the wrapper
      for key, value in props.items():
          assert getattr(env, key) == value
  
      # Otherwise, test if the properties are forwarded
      all_properties = {
          "observation_space",
          "action_space",
          "reward_range",
          "metadata",
      }
      for key in all_properties - props.keys():
          assert getattr(env, key) == getattr(env.unwrapped, key)
  
imports: from typing import Optional
  import numpy
  import pytest
  from gym import core, spaces
  from gym.wrappers import OrderEnforcing, TimeLimit
label_desc: Use image node_id 2 for calling a global function with example usage: test_wrapper_property_forwarding(class_, props) without return types