code: def test_model_multiple_learn_no_reset(model_class):
      """Check that when we call learn multiple times, we don't unnecessarily
      reset the environment.
      """
      if model_class is ACER:
  
          def make_env():
              return IdentityEnv(ep_length=1e10, dim=2)
  
      else:
  
          def make_env():
              return IdentityEnvBox(ep_length=1e10)
  
      env = make_env()
      venv = DummyVecEnv([lambda: env])
      model = model_class(policy="MlpPolicy", env=venv)
      _check_reset_count(model, env)
  
      # Try again following a `set_env`.
      env = make_env()
      venv = DummyVecEnv([lambda: env])
      assert env.num_resets == 0
  
      model.set_env(venv)
      _check_reset_count(model, env)
  
imports: import pytest
  from stable_baselines import A2C, ACER, ACKTR, PPO2
  from stable_baselines.common.identity_env import IdentityEnv, IdentityEnvBox
  from stable_baselines.common.vec_env import DummyVecEnv
label_desc: Use image node_id 1 for calling a global function with example usage: test_model_multiple_learn_no_reset(model_class) and returns: IdentityEnv, IdentityEnvBox