code: def test_sync_vec_normalize():
      env = DummyVecEnv([make_env])
  
      assert unwrap_vec_normalize(env) is None
  
      env = VecNormalize(
          env,
          norm_obs=True,
          norm_reward=True,
          clip_obs=10.0,
          clip_reward=10.0,
      )
  
      assert isinstance(unwrap_vec_normalize(env), VecNormalize)
  
      env = VecFrameStack(env, 1)
  
      assert isinstance(unwrap_vec_normalize(env), VecNormalize)
  
      eval_env = DummyVecEnv([make_env])
      eval_env = VecNormalize(
          eval_env,
          training=False,
          norm_obs=True,
          norm_reward=True,
          clip_obs=10.0,
          clip_reward=10.0,
      )
      eval_env = VecFrameStack(eval_env, 1)
  
      env.reset()
      # Initialize running mean
      for _ in range(100):
          env.step([env.action_space.sample()])
  
      obs = env.reset()
      original_obs = env.get_original_obs()
      dummy_rewards = np.random.rand(10)
      # Normalization must be different
      assert not np.allclose(obs, eval_env.normalize_obs(original_obs))
  
      sync_envs_normalization(env, eval_env)
  
      # Now they must be synced
      assert np.allclose(obs, eval_env.normalize_obs(original_obs))
      assert np.allclose(
          env.normalize_reward(dummy_rewards),
          eval_env.normalize_reward(dummy_rewards),
      )
  
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 10 for calling a global function with example usage: test_sync_vec_normalize() without return types