code: def run_train_episode(env, agent, scaler):
      obs = env.reset()
      observes, actions, rewards, unscaled_obs = [], [], [], []
      step = 0.0
      scale, offset = scaler.get()
      scale[-1] = 1.0  # don't scale time step feature
      offset[-1] = 0.0  # don't offset time step feature
      while True:
          obs = obs.reshape((1, -1))
          obs = np.append(
              obs, [[step]], axis=1
          )  # add time step feature
          unscaled_obs.append(obs)
          obs = (obs - offset) * scale  # center and scale observations
          obs = obs.astype("float32")
          observes.append(obs)
  
          action = agent.policy_sample(obs)
          action = np.clip(action, -1.0, 1.0)
  
          action = action.reshape((1, -1)).astype("float32")
          actions.append(action)
  
          obs, reward, done, _ = env.step(np.squeeze(action))
          rewards.append(reward)
          step += 1e-3  # increment time step feature
  
          if done:
              break
  
      return (
          np.concatenate(observes),
          np.concatenate(actions),
          np.array(rewards, dtype="float32"),
          np.concatenate(unscaled_obs),
      )
  
file_path: PARL/benchmark/fluid/PPO/train.py
imports: from parl.utils import check_version_for_fluid
  import argparse
  import gym
  import numpy
  import parl
  from mujoco_agent import MujocoAgent
  from mujoco_model import MujocoModel
  from parl.utils import logger
  from parl.utils.rl_utils import calc_gae, calc_discount_sum_rewards
  from parl.env.continuous_wrappers import ActionMappingWrapper
  from scaler import Scaler
label_desc: Use image node_id 1 for calling a global function with example usage: run_train_episode(env, agent, scaler) and returns: np,  np,  np,  np