class_docstr: Abstract base class for RLlib callbacks (similar to Keras callbacks).
  
  These callbacks can be used for custom metrics and custom postprocessing.
  
  By default, all of these callbacks are no-ops. To configure custom training
  callbacks, subclass DefaultCallbacks and then set
  {"callbacks": YourCallbacksClass} in the algo config.
class_docstr_tok: ["Abstract","base","class","for","RLlib","callbacks","(","similar","to","Keras","callbacks",")",".","These","callbacks","can","be","used","for","custom","metrics","and","custom","postprocessing",".","By","default",",","all","of","these","callbacks","are","no-ops",".","To","configure","custom","training","callbacks",",","subclass","DefaultCallbacks","and","then","set","{","``","callbacks","''",":","YourCallbacksClass","}","in","the","algo","config","."]
docstr: Called immediately after a policy's postprocess_fn is called.
  
  You can use this callback to do additional postprocessing for a policy,
  including looking at the trajectory data of other agents in multi-agent
  settings.
  
  Args:
      worker: Reference to the current rollout worker.
      episode: Episode object.
      agent_id: Id of the current agent.
      policy_id: Id of the current policy for the agent.
      policies: Dict mapping policy IDs to policy objects. In single
          agent mode there will only be a single "default_policy".
      postprocessed_batch: The postprocessed sample batch
          for this agent. You can mutate this object to apply your own
          trajectory postprocessing.
      original_batches: Dict mapping agent IDs to their unpostprocessed
          trajectory data. You should not mutate this object.
      kwargs: Forward compatibility placeholder.
docstr_tok: ["Called","immediately","after","a","policy","'s","postprocess_fn","is","called",".","You","can","use","this","callback","to","do","additional","postprocessing","for","a","policy",",","including","looking","at","the","trajectory","data","of","other","agents","in","multi-agent","settings",".","Args",":","worker",":","Reference","to","the","current","rollout","worker",".","episode",":","Episode","object",".","agent_id",":","Id","of","the","current","agent",".","policy_id",":","Id","of","the","current","policy","for","the","agent",".","policies",":","Dict","mapping","policy","IDs","to","policy","objects",".","In","single","agent","mode","there","will","only","be","a","single","``","default_policy","''",".","postprocessed_batch",":","The","postprocessed","sample","batch","for","this","agent",".","You","can","mutate","this","object","to","apply","your","own","trajectory","postprocessing",".","original_batches",":","Dict","mapping","agent","IDs","to","their","unpostprocessed","trajectory","data",".","You","should","not","mutate","this","object",".","kwargs",":","Forward","compatibility","placeholder","."]
code: def on_postprocess_trajectory(
      self,
      *,
      worker: "EnvRunner",
      episode: Episode,
      agent_id: AgentID,
      policy_id: PolicyID,
      policies: Dict[PolicyID, Policy],
      postprocessed_batch: SampleBatch,
      original_batches: Dict[AgentID, Tuple[Policy, SampleBatch]],
      **kwargs,
  ) -> None:
      """Called immediately after a policy's postprocess_fn is called.
  
      You can use this callback to do additional postprocessing for a policy,
      including looking at the trajectory data of other agents in multi-agent
      settings.
  
      Args:
          worker: Reference to the current rollout worker.
          episode: Episode object.
          agent_id: Id of the current agent.
          policy_id: Id of the current policy for the agent.
          policies: Dict mapping policy IDs to policy objects. In single
              agent mode there will only be a single "default_policy".
          postprocessed_batch: The postprocessed sample batch
              for this agent. You can mutate this object to apply your own
              trajectory postprocessing.
          original_batches: Dict mapping agent IDs to their unpostprocessed
              trajectory data. You should not mutate this object.
          kwargs: Forward compatibility placeholder.
      """
      pass
  
imports: import gc
  import os
  import platform
  import tracemalloc
  from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Type, Union
  import gymnasium
  import numpy
  from ray.rllib.core.rl_module.rl_module import RLModule
  from ray.rllib.env.base_env import BaseEnv
  from ray.rllib.env.env_context import EnvContext
  from ray.rllib.evaluation.episode import Episode
  from ray.rllib.evaluation.episode_v2 import EpisodeV2
  from ray.rllib.evaluation.postprocessing import Postprocessing
  from ray.rllib.policy import Policy
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.annotations import override, OverrideToImplementCustomLogic, PublicAPI
  from ray.rllib.utils.deprecation import deprecation_warning
  from ray.rllib.utils.exploration.random_encoder import _MovingMeanStd, compute_states_entropy, update_beta
  from ray.rllib.utils.typing import AgentID, EnvType, EpisodeType, PolicyID
  from ray.tune.callback import _CallbackMeta
  import psutil
label_desc: Use image node_id 14 for calling the DefaultCallbacks obj's underlying member method code with example usage: obj.on_postprocess_trajectory() without return types