class_docstr: Fills in the opponent actions info in the training batches.
class_docstr_tok: ["Fills","in","the","opponent","actions","info","in","the","training","batches","."]
code: def on_postprocess_trajectory(
      self,
      worker,
      episode,
      agent_id,
      policy_id,
      policies,
      postprocessed_batch,
      original_batches,
      **kwargs,
  ):
      to_update = postprocessed_batch[SampleBatch.CUR_OBS]
      other_id = 1 if agent_id == 0 else 0
      action_encoder = ModelCatalog.get_preprocessor_for_space(
          Discrete(2)
      )
  
      # set the opponent actions into the observation
      _, opponent_batch = original_batches[other_id]
      opponent_actions = np.array(
          [
              action_encoder.transform(a)
              for a in opponent_batch[SampleBatch.ACTIONS]
          ]
      )
      to_update[:, -2:] = opponent_actions
  
file_path: ray/python/ray/rllib/examples/centralized_critic_2.py
imports: import numpy
  from gymnasium.spaces import Dict, Discrete
  import argparse
  import os
  from ray import air, tune
  from ray.rllib.algorithms.callbacks import DefaultCallbacks
  from ray.rllib.algorithms.ppo import PPOConfig
  from ray.rllib.examples.models.centralized_critic_models import YetAnotherCentralizedCriticModel, YetAnotherTorchCentralizedCriticModel
  from ray.rllib.examples.env.two_step_game import TwoStepGame
  from ray.rllib.models import ModelCatalog
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.test_utils import check_learning_achieved
label_desc: Use image node_id 1 for calling the FillInActions obj's underlying member method code with example usage: obj.on_postprocess_trajectory(worker, episode, agent_id, policy_id, policies, postprocessed_batch, original_batches) without return types