class_docstr: Encapsulates multiple torch state action critics for training in structured environments.
  
  :param networks: Mapping of value functions (critic) to encapsulate.
  :param num_policies: The number of corresponding policies.
  :param device: Device the policy should be located on (cpu or cuda)
  :param only_discrete_spaces: A dict specifying if the action spaces w.r.t. the step only hold discrete action
                               spaces.
class_docstr_tok: ["Encapsulates","multiple","torch","state","action","critics","for","training","in","structured","environments",".",":","param","networks",":","Mapping","of","value","functions","(","critic",")","to","encapsulate",".",":","param","num_policies",":","The","number","of","corresponding","policies",".",":","param","device",":","Device","the","policy","should","be","located","on","(","cpu","or","cuda",")",":","param","only_discrete_spaces",":","A","dict","specifying","if","the","action","spaces","w.r.t",".","the","step","only","hold","discrete","action","spaces","."]
docstr: Retrieve all trainable critic parameters (to be assigned to optimizers).
  :return: List of lists holding all parameters for the base critic corresponding to number of critic per step.
docstr_tok: ["Retrieve","all","trainable","critic","parameters","(","to","be","assigned","to","optimizers",")",".",":","return",":","List","of","lists","holding","all","parameters","for","the","base","critic","corresponding","to","number","of","critic","per","step","."]
code: def per_critic_parameters(self) -> List[List[torch.Tensor]]:
      """Retrieve all trainable critic parameters (to be assigned to optimizers).
      :return: List of lists holding all parameters for the base critic corresponding to number of critic per step.
      """
      params = []
      for critic_num in range(self._num_critics_per_step):
          params.append([])
          for step_key in self.step_critic_keys:
              params[critic_num].append(
                  self.networks[
                      self.critic_key_mapping[step_key][critic_num]
                  ].parameters()
              )
      for critic_num in range(self._num_critics_per_step):
          params[critic_num] = itertools.chain(*params[critic_num])
      return params
  
imports: import copy
  import itertools
  from abc import abstractmethod
  from typing import Mapping, Union, List, Dict
  import torch
  from gym import spaces
  from torch import nn
  from torch.distributions.utils import logits_to_probs
  from maze.core.agent.state_action_critic import StateActionCritic
  from maze.core.agent.torch_model import TorchModel
  from maze.core.annotations import override
  from maze.core.wrappers.observation_preprocessing.preprocessors.one_hot import OneHotPreProcessor
  from maze.perception.blocks.inference import InferenceBlock
  from maze.perception.perception_utils import flatten_spaces, convert_to_numpy, convert_to_torch
  from maze.perception.weight_init import make_module_init_normc
  from maze.utils.bcolors import BColors
label_desc: Use image node_id 7 for calling the TorchStateActionCritic obj's underlying member method code with example usage: obj.per_critic_parameters() and returns: params