code: def train_ppo_agent_from_checkpointed_module(
      module_spec_from_ckpt: SingleAgentRLModuleSpec,
  ) -> float:
      """Train a checkpointed RLModule using PPO.
  
      Args:
          module_spec_from_ckpt: The module spec of the checkpointed RLModule.
  
      Returns:
          The best reward mean achieved by the PPO agent.
  
      """
  
      config = (
          PPOConfig()
          .experimental(_enable_new_api_stack=True)
          .rl_module(rl_module_spec=module_spec_from_ckpt)
          .environment(GYM_ENV_NAME)
          .debugging(seed=0)
      )
  
      tuner = tune.Tuner(
          "PPO",
          param_space=config.to_dict(),
          run_config=RunConfig(
              stop={"training_iteration": 10},
              failure_config=FailureConfig(fail_fast="raise"),
              verbose=2,
          ),
      )
      results = tuner.fit()
      best_reward_mean = results.get_best_result().metrics[
          "episode_reward_mean"
      ]
      return best_reward_mean
  
file_path: ray/python/ray/rllib/examples/learner/train_w_bc_finetune_w_ppo.py
imports: import gymnasium
  import shutil
  import tempfile
  import torch
  from typing import Mapping
  import ray
  from ray import tune
  from ray.train import RunConfig, FailureConfig
  from ray.rllib.algorithms.ppo import PPOConfig
  from ray.rllib.algorithms.ppo.torch.ppo_torch_rl_module import PPOTorchRLModule
  from ray.rllib.algorithms.ppo.ppo_catalog import PPOCatalog
  from ray.rllib.core.models.base import ACTOR, ENCODER_OUT
  from ray.rllib.core.rl_module.rl_module import SingleAgentRLModuleSpec
label_desc: Use image node_id 2 for calling a global function with example usage: train_ppo_agent_from_checkpointed_module(module_spec_from_ckpt) and returns: best_reward_mean