code: def test_deterministic_training_common(algo):
      results = [[], []]
      rewards = [[], []]
      kwargs = {"n_cpu_tf_sess": 1}
      if algo in [DDPG, TD3, SAC]:
          env_id = "Pendulum-v0"
          kwargs.update({"action_noise": NormalActionNoise(0.0, 0.1)})
      else:
          env_id = "CartPole-v1"
          if algo == DQN:
              kwargs.update({"learning_starts": 100})
  
      for i in range(2):
          model = algo("MlpPolicy", env_id, seed=SEED, **kwargs)
          model.learn(N_STEPS_TRAINING)
          env = model.get_env()
          obs = env.reset()
          for _ in range(20):
              action, _ = model.predict(obs, deterministic=False)
              obs, reward, _, _ = env.step(action)
              results[i].append(action)
              rewards[i].append(reward)
      assert sum(results[0]) == sum(results[1]), results
      assert sum(rewards[0]) == sum(rewards[1]), rewards
  
imports: import pytest
  import numpy
  from stable_baselines import A2C, ACER, ACKTR, DQN, DDPG, PPO1, PPO2, SAC, TRPO, TD3
  from stable_baselines.common.noise import NormalActionNoise
label_desc: Use image node_id 2 for calling a global function with example usage: test_deterministic_training_common(algo) without return types