code: def train_pipeline_conservative(
      env,
      player,
      score_threshold,
      batch_size,
      n_epoch,
      n_rollout,
      n_train,
      learn_start=0,
      early_stop=True,
  ):
      for i_epoch in range(n_epoch):
          rewards, losses = [], []
          for _ in range(n_rollout):
              reward = 0
              obs = env.reset()
              for t in range(env._max_episode_steps):
                  action = player.act(obs)
                  obs_next, rwd, done, _ = env.step(action)
                  player.store(
                      (
                          obs,
                          action,
                          rwd,
                          obs_next,
                          float(
                              False
                              if t == env._max_episode_steps - 1
                              else done
                          ),
                      )
                  )
                  reward += rwd
                  if done:
                      break
                  obs = obs_next
              rewards.append(reward)
  
          if i_epoch > learn_start:
              for _ in range(n_train):
                  loss = player.learn(batch_size)
                  if loss is not None:
                      losses.append(loss)
  
          if i_epoch % 1 == 0:
              mean_reward = np.mean(rewards)
              print("===========================")
              print("i_epoch: {}".format(i_epoch))
              print("epsilon: {}".format(player.epsilon))
              print(
                  "Average score of {} rollout games: {}".format(
                      n_rollout, mean_reward
                  )
              )
              if i_epoch > learn_start:
                  print(
                      "Average training loss: {}".format(
                          np.mean(losses)
                      )
                  )
              print("===========================")
              print()
              if early_stop and mean_reward >= score_threshold:
                  break
  
label_desc: Use image node_id 2 for calling a global function with example usage: train_pipeline_conservative(env, player, score_threshold, batch_size, n_epoch, n_rollout, n_train, learn_start, early_stop) without return types