code: def test_vec_env(tmpdir):
      """Test VecNormalize Object"""
      clip_obs = 0.5
      clip_reward = 5.0
  
      orig_venv = DummyVecEnv([make_env])
      norm_venv = VecNormalize(
          orig_venv,
          norm_obs=True,
          norm_reward=True,
          clip_obs=clip_obs,
          clip_reward=clip_reward,
      )
      _, done = norm_venv.reset(), [False]
      while not done[0]:
          actions = [norm_venv.action_space.sample()]
          obs, rew, done, _ = norm_venv.step(actions)
          assert np.max(np.abs(obs)) <= clip_obs
          assert np.max(np.abs(rew)) <= clip_reward
  
      path = str(tmpdir.join("vec_normalize"))
      norm_venv.save(path)
      deserialized = VecNormalize.load(path, venv=orig_venv)
      check_vec_norm_equal(norm_venv, deserialized)
  
file_path: stable-baselines/tests/test_vec_normalize.py
imports: import subprocess
  import gym
  import numpy
  import pytest
  from stable_baselines import DDPG, DQN, SAC, TD3
  from stable_baselines.common.running_mean_std import RunningMeanStd
  from stable_baselines.common.vec_env import DummyVecEnv, VecNormalize, VecFrameStack, sync_envs_normalization, unwrap_vec_normalize
  from .test_common import _assert_eq
label_desc: Use image node_id 5 for calling a global function with example usage: test_vec_env(tmpdir) without return types