code: def test_normalize_external():
      venv = _make_warmstart_cartpole()
  
      rewards = np.array([1, 1])
      norm_rewards = venv.normalize_reward(rewards)
      assert norm_rewards.shape == rewards.shape
      # Episode return is almost always >= 1 in CartPole. So reward should shrink.
      assert np.all(norm_rewards < 1)
  
      # Don't have any guarantees on obs normalization, except shape, really.
      obs = np.array([0, 0, 0, 0])
      norm_obs = venv.normalize_obs(obs)
      assert obs.shape == norm_obs.shape
  
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 8 for calling a global function with example usage: test_normalize_external() without return types