code: def compute_policy_gradient_full_correction(
      action_distrib,
      action_distrib_mu,
      action_value,
      v,
      truncation_threshold,
  ):
      """Compute off-policy bias correction term wrt all actions."""
      assert isinstance(action_distrib, torch.distributions.Categorical)
      assert isinstance(
          action_distrib_mu, torch.distributions.Categorical
      )
      assert truncation_threshold is not None
      assert np.isscalar(v)
      with torch.no_grad():
          rho_all_inv = compute_full_importance(
              action_distrib_mu, action_distrib
          )
          correction_weight = (
              torch.nn.functional.relu(
                  1 - truncation_threshold * rho_all_inv
              )
              * action_distrib.probs[0]
          )
          correction_advantage = action_value.q_values[0] - v
      # Categorical.logits is already normalized, i.e., logits[i] = log(probs[i])
      return -(
          correction_weight
          * action_distrib.logits
          * correction_advantage
      ).sum(1)
  
imports: import copy
  from logging import getLogger
  import numpy
  import torch
  from torch import nn
  from pfrl import agent
  from pfrl.action_value import SingleActionValue
  from pfrl.utils import clip_l2_grad_norm_, copy_param
  from pfrl.utils.batch_states import batch_states
  from pfrl.utils.mode_of_distribution import mode_of_distribution
  from pfrl.utils.recurrent import detach_recurrent_state, one_step_forward
label_desc: Use image node_id 3 for calling a global function with example usage: compute_policy_gradient_full_correction(action_distrib, action_distrib_mu, action_value, v, truncation_threshold) and returns: unknown