code: def training_step(self, batch: Dict[str, Tensor]):
      # Get actions and values given the current observations
      _, newlogprob, entropy, newvalue = self(
          batch["obs"], batch["actions"].long()
      )
      logratio = newlogprob - batch["logprobs"]
      ratio = logratio.exp()
  
      # Policy loss
      advantages = batch["advantages"]
      if self.normalize_advantages:
          advantages = (advantages - advantages.mean()) / (
              advantages.std() + 1e-8
          )
  
      pg_loss = policy_loss(batch["advantages"], ratio, self.clip_coef)
  
      # Value loss
      v_loss = value_loss(
          newvalue,
          batch["values"],
          batch["returns"],
          self.clip_coef,
          self.clip_vloss,
          self.vf_coef,
      )
  
      # Entropy loss
      ent_loss = entropy_loss(entropy, self.ent_coef)
  
      # Update metrics
      self.avg_pg_loss(pg_loss)
      self.avg_value_loss(v_loss)
      self.avg_ent_loss(ent_loss)
  
      # Overall loss
      return pg_loss + ent_loss + v_loss
  
imports: import math
  from typing import Dict, Tuple
  import gymnasium
  import torch
  import torch.nn.functional
  from lightning.pytorch import LightningModule
  from torch import Tensor
  from torch.distributions import Categorical
  from torchmetrics import MeanMetric
  from rl.loss import entropy_loss, policy_loss, value_loss
  from rl.utils import layer_init
label_desc: Use image node_id 8 for calling the PPOLightningAgent obj's underlying member method code with example usage: obj.training_step(batch) and returns: unknown