code: def test_recurrent_eval_callback():
      env_id = "Pendulum-v0"
  
      # Create envs
      env = make_vec_env(env_id, n_envs=4)
      eval_env = make_vec_env(env_id, n_envs=1)
  
      # Create RL model
      model = PPO2("MlpLstmPolicy", env)
  
      # Stop training if the performance is good enough
      callback_on_best = StopTrainingOnRewardThreshold(
          reward_threshold=-1200, verbose=1
      )
  
      eval_callback = EvalCallback(
          eval_env,
          callback_on_new_best=callback_on_best,
          best_model_save_path=LOG_FOLDER,
          log_path=LOG_FOLDER,
          eval_freq=100,
      )
  
      model.learn(300, callback=eval_callback)
  
      # Cleanup
      if os.path.exists(LOG_FOLDER):
          shutil.rmtree(LOG_FOLDER)
  
file_path: stable-baselines/tests/test_callbacks.py
imports: import os
  import shutil
  import pytest
  from stable_baselines import A2C, ACKTR, ACER, DQN, DDPG, PPO1, PPO2, SAC, TD3, TRPO
  from stable_baselines.common import make_vec_env
  from stable_baselines.common.callbacks import CallbackList, CheckpointCallback, EvalCallback, EveryNTimesteps, StopTrainingOnRewardThreshold, BaseCallback
label_desc: Use image node_id 2 for calling a global function with example usage: test_recurrent_eval_callback() without return types