docstr: Test whether APPO can be built with kl_loss enabled.
docstr_tok: ["Test","whether","APPO","can","be","built","with","kl_loss","enabled","."]
code: def test_appo_compilation_use_kl_loss(self):
      """Test whether APPO can be built with kl_loss enabled."""
      config = (
          appo.APPOConfig()
          .rollouts(num_rollout_workers=1)
          .training(use_kl_loss=True)
      )
      num_iterations = 2
  
      for _ in framework_iterator(config):
          algo = config.build(env="CartPole-v1")
          for i in range(num_iterations):
              results = algo.train()
              check_train_results(results)
              print(results)
          check_compute_single_action(algo)
          algo.stop()
  
file_path: ray/python/ray/rllib/algorithms/appo/tests/test_appo.py
imports: import unittest
  import ray
  import ray.rllib.algorithms.appo
  from ray.rllib.policy.sample_batch import DEFAULT_POLICY_ID
  from ray.rllib.utils.metrics.learner_info import LEARNER_INFO, LEARNER_STATS_KEY
  from ray.rllib.utils.test_utils import check_compute_single_action, check_train_results, framework_iterator
label_desc: Use image node_id 4 for calling the TestAPPO obj's underlying member method code with example usage: obj.test_appo_compilation_use_kl_loss() without return types