class_docstr: Proximal Policy Optimization trainer. Suitable for multi-step and multi-agent scenarios. 
class_docstr_tok: ["Proximal","Policy","Optimization","trainer",".","Suitable","for","multi-step","and","multi-agent","scenarios","."]
docstr: Flattens sub-step items for batch processing in PPO.
  :param step_items: Dict of items to be flattened.
docstr_tok: ["Flattens","sub-step","items","for","batch","processing","in","PPO",".",":","param","step_items",":","Dict","of","items","to","be","flattened","."]
code: def _flatten_sub_step_items(
      step_items: List[Dict[str, torch.Tensor]]
  ) -> None:
      """Flattens sub-step items for batch processing in PPO.
      :param step_items: Dict of items to be flattened.
      """
  
      for substep_dict in step_items:
          for key in substep_dict.keys():
              substep_dict[key] = torch.flatten(
                  substep_dict[key], start_dim=0, end_dim=1
              )
  
file_path: maze/maze/train/trainers/ppo/ppo_trainer.py
imports: import copy
  from collections import defaultdict
  from typing import Dict, List
  import numpy
  import torch
  from maze.core.annotations import override
  from maze.core.trajectory_recording.records.spaces_record import SpacesRecord
  from maze.core.trajectory_recording.records.structured_spaces_record import StructuredSpacesRecord
  from maze.train.trainers.common.actor_critic.actor_critic_trainer import ActorCritic
label_desc: Use image node_id 2 for calling the PPO obj's underlying member method code with example usage: obj._flatten_sub_step_items(step_items) without return types