code: def test_check_nan():
      """Test VecCheckNan Object"""
  
      env = DummyVecEnv([NanAndInfEnv])
      env = VecCheckNan(env, raise_exception=True)
  
      env.step([[0]])
  
      try:
          env.step([[float("NaN")]])
      except ValueError:
          pass
      else:
          assert False
  
      try:
          env.step([[float("inf")]])
      except ValueError:
          pass
      else:
          assert False
  
      try:
          env.step([[-1]])
      except ValueError:
          pass
      else:
          assert False
  
      try:
          env.step([[1]])
      except ValueError:
          pass
      else:
          assert False
  
      env.step(np.array([[0, 1], [0, 1]]))
  
file_path: stable-baselines/tests/test_vec_check_nan.py
imports: import gym
  from gym import spaces
  import numpy
  from stable_baselines.common.vec_env import DummyVecEnv, VecCheckNan
label_desc: Use image node_id 1 for calling a global function with example usage: test_check_nan() without return types