code: def run_train_episode(env, agent, rpm):
      act_dim = env.action_space.shape[0]
      obs = env.reset()
      done = False
      total_reward = 0
      steps = 0
  
      while not done:
          steps += 1
  
          if rpm.size() < WARMUP_SIZE:
              action = np.random.uniform(-1, 1, size=act_dim)
          else:
              action = agent.sample(np.array(obs))
  
          next_obs, reward, done, info = env.step(action)
          terminal = (
              float(done) if steps < env._max_episode_steps else 0
          )
          rpm.append(obs, action, reward, next_obs, terminal)
  
          obs = next_obs
          total_reward += reward
  
          if rpm.size() > WARMUP_SIZE:
              (
                  batch_obs,
                  batch_action,
                  batch_reward,
                  batch_next_obs,
                  batch_terminal,
              ) = rpm.sample_batch(BATCH_SIZE)
              agent.learn(
                  batch_obs,
                  batch_action,
                  batch_reward,
                  batch_next_obs,
                  batch_terminal,
              )
  
      return total_reward, steps
  
file_path: PARL/benchmark/torch/td3/train.py
imports: import gym
  import argparse
  import numpy
  from parl.utils import logger, summary, ReplayMemory
  from parl.env import ActionMappingWrapper, CompatWrapper
  from mujoco_model import MujocoModel
  from mujoco_agent import MujocoAgent
  from parl.algorithms import TD3
label_desc: Use image node_id 1 for calling a global function with example usage: run_train_episode(env, agent, rpm) and returns: total_reward,  steps