code: def test_quickstart(self):
      self.start_tests(name="quickstart")
  
      with TemporaryDirectory() as saver_directory, TemporaryDirectory() as summarizer_directory:
          # ====================
  
          # OpenAI-Gym environment specification
          environment = dict(environment="gym", level="CartPole-v1")
          # or: environment = Environment.create(
          #         environment='gym', level='CartPole-v1', max_episode_timesteps=500)
  
          # PPO agent specification
          agent = dict(
              agent="ppo",
              # Automatically configured network
              network="auto",
              # PPO optimization parameters
              batch_size=10,
              update_frequency=2,
              learning_rate=3e-4,
              multi_step=10,
              subsampling_fraction=0.33,
              # Reward estimation
              likelihood_ratio_clipping=0.2,
              discount=0.99,
              predict_terminal_values=False,
              reward_processing=None,
              # Baseline network and optimizer
              baseline=dict(type="auto", size=32, depth=1),
              baseline_optimizer=dict(
                  optimizer="adam", learning_rate=1e-3, multi_step=10
              ),
              # Regularization
              l2_regularization=0.0,
              entropy_regularization=0.0,
              # Preprocessing
              state_preprocessing="linear_normalization",
              # Exploration
              exploration=0.0,
              variable_noise=0.0,
              # Default additional config values
              config=None,
              # Save model every 10 updates and keep the 5 most recent checkpoints
              saver=dict(
                  directory=saver_directory,
                  frequency=10,
                  max_checkpoints=5,
              ),
              # Log all available Tensorboard summaries
              summarizer=dict(
                  directory=summarizer_directory, summaries="all"
              ),
              # Do not record agent-environment interaction trace
              recorder=None,
          )
          # or: Agent.create(agent='ppo', environment=environment, ...)
          # with additional argument "environment" and, if applicable, "parallel_interactions"
  
          # Initialize the runner
          runner = Runner(
              agent=agent,
              environment=environment,
              max_episode_timesteps=500,
          )
  
          # Train for 200 episodes
          runner.run(num_episodes=20)
          runner.close()
  
          # plus agent.close() and environment.close() if created separately
  
          # ====================
  
          files = set(os.listdir(path=saver_directory))
          self.assertTrue(
              files
              == {
                  "agent.json",
                  "agent-0.data-00000-of-00001",
                  "agent-0.index",
                  "agent-10.data-00000-of-00001",
                  "agent-10.index",
                  "checkpoint",
              }
          )
  
          directories = os.listdir(path=summarizer_directory)
          self.assertEqual(len(directories), 1)
          files = os.listdir(
              path=os.path.join(summarizer_directory, directories[0])
          )
          self.assertEqual(len(files), 1)
          self.assertTrue(files[0].startswith("events.out.tfevents."))
  
      self.finished_test()
  
imports: import os
  from tempfile import TemporaryDirectory
  from threading import Thread
  import unittest
  import numpy
  import tensorflow
  from tensorforce import Agent, Environment, Runner
  from test.unittest_base import UnittestBase
label_desc: Use image node_id 1 for calling the TestExamples obj's underlying member method code with example usage: obj.test_quickstart() without return types