code: def test_deterministic_td3():
      results = [[], []]
      rewards = [[], []]
      kwargs = {"n_cpu_tf_sess": 1}
      env_id = "Pendulum-v0"
      kwargs.update({"action_noise": NormalActionNoise(0.0, 0.1)})
  
      for i in range(2):
          model = TD3("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=True)
              obs, reward, _, _ = env.step(action)
              results[i].append(action)
              rewards[i].append(reward)
      # without the extended tolerance, test fails for unknown reasons on Github...
      assert np.allclose(results[0], results[1], rtol=1e-2), results
      assert np.allclose(rewards[0], rewards[1], rtol=1e-2), 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 1 for calling a global function with example usage: test_deterministic_td3() without return types