code: def test_agent(self):
      self.start_tests(name="getting-started-agent")
  
      environment = Environment.create(
          environment="gym", level="CartPole", max_episode_timesteps=50
      )
      self.finished_test()
  
      agent = Agent.create(
          agent="tensorforce",
          environment=environment,
          update=64,
          optimizer=dict(optimizer="adam", learning_rate=1e-3),
          objective="policy_gradient",
          reward_estimation=dict(horizon=20),
      )
      self.finished_test()
  
      agent = Agent.create(
          agent="ppo",
          environment=environment,
          batch_size=10,
          learning_rate=1e-3,
      )
      self.finished_test()
  
      agent = Agent.create(
          agent="test/data/agent.json", environment=environment
      )
      self.finished_test()
  
file_path: tensorforce/test/test_documentation.py
imports: import unittest
  from tensorforce import Agent, Environment, Runner
  from test.unittest_base import UnittestBase
label_desc: Use image node_id 2 for calling the TestDocumentation obj's underlying member method code with example usage: obj.test_agent() without return types