code: def get_log_rhos(
      target_action_log_probs: List[TorchActionType],
      behaviour_action_log_probs: List[TorchActionType],
  ) -> List[torch.Tensor]:
      """With the selected log_probs for multi-discrete actions of behavior
      and target policies we compute the log_rhos for calculating the vtrace.
  
      :param target_action_log_probs: A list (w.r.t. the substeps of the env) of dicts (w.r.t. the actions) of tensors of
          shape [T, B] corresponding to the sampling log probability of the chosen action w.r.t. the target policy.
      :param behaviour_action_log_probs: A list (w.r.t. the substeps of the env) of dicts (w.r.t. the actions) of tensors
          of shape [T, B] corresponding to the sampling log probability of the chosen action w.r.t. the behaviour policy.
  
      :return: a list (w.r.t. the substeps of the env) of tensors, where each tensor is of the shape [T,B]
      """
      log_rhos = list()
      # TODO: Consider doing this for each individual action
      with torch.no_grad():
          for (
              step_target_action_log_probs,
              step_behaviour_action_log_probs,
          ) in zip(target_action_log_probs, behaviour_action_log_probs):
              target = torch.stack(
                  list(step_target_action_log_probs.values())
              )
              behaviour = torch.stack(
                  list(step_behaviour_action_log_probs.values())
              )
  
              step_log_rhos = torch.sum(target - behaviour, dim=0)
              log_rhos.append(step_log_rhos)
      return log_rhos
  
file_path: maze/maze/train/trainers/impala/impala_vtrace.py
imports: import collections
  from typing import List, Tuple, Union
  import torch
  from maze.core.env.action_conversion import TorchActionType
  from maze.distributions.dict import DictProbabilityDistribution
  from maze.distributions.distribution_mapper import DistributionMapper
  from maze.perception.perception_utils import convert_to_torch
label_desc: Use image node_id 4 for calling a global function with example usage: get_log_rhos(target_action_log_probs, behaviour_action_log_probs) and returns: log_rhos