code: def _check_nan(env: gym.Env) -> None:
      """Check for Inf and NaN using the VecWrapper."""
      vec_env = VecCheckNan(DummyVecEnv([lambda: env]))
      for _ in range(10):
          action = [env.action_space.sample()]
          _, _, _, _ = vec_env.step(action)
  
file_path: stable-baselines/stable_baselines/common/env_checker.py
imports: import warnings
  from typing import Union
  import gym
  from gym import spaces
  import numpy
  from stable_baselines.common.vec_env import DummyVecEnv, VecCheckNan
label_desc: Use image node_id 4 for calling a global function with example usage: _check_nan(env) without return types