code: def _test_coach(
      sagemaker_session,
      rl_framework,
      rl_coach_version,
      cpu_instance_type,
  ):
      source_dir = os.path.join(DATA_DIR, "coach_cartpole")
      dependencies = [os.path.join(DATA_DIR, "sagemaker_rl")]
      cartpole = "train_coach.py"
  
      return RLEstimator(
          toolkit=RLToolkit.COACH,
          toolkit_version=rl_coach_version,
          framework=rl_framework,
          entry_point=cartpole,
          source_dir=source_dir,
          role="SageMakerRole",
          instance_count=1,
          instance_type=cpu_instance_type,
          sagemaker_session=sagemaker_session,
          dependencies=dependencies,
          hyperparameters={
              "save_model": 1,
              "RLCOACH_PRESET": "preset_cartpole_clippedppo",
              "rl.agent_params.algorithm.discount": 0.9,
              "rl.evaluation_steps:EnvironmentEpisodes": 1,
          },
      )
  
file_path: sagemaker-python-sdk/tests/integ/test_rl.py
imports: from __future__ import absolute_import
  import os
  import numpy
  import pytest
  from sagemaker.rl import RLEstimator, RLFramework, RLToolkit
  from sagemaker.utils import sagemaker_timestamp, unique_name_from_base
  from tests.integ import DATA_DIR, RL_SUPPORTED_REGIONS, test_region
  from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
label_desc: Use image node_id 3 for calling a global function with example usage: _test_coach(sagemaker_session, rl_framework, rl_coach_version, cpu_instance_type) and returns: RLEstimator