code: def test_ppo_v_head_loss_weight():
      total_return = mx.nd.array((5, -3, 0))
      old_policy_values = mx.nd.array((3, -1, -1))
      new_policy_values = mx.nd.array((4, -2, -1))
      loss_fn = PPOVHeadLoss(
          clip_likelihood_ratio_using_epsilon=0.2, weight=1
      )
      loss = loss_fn(new_policy_values, old_policy_values, total_return)
      loss_fn_weighted = PPOVHeadLoss(
          clip_likelihood_ratio_using_epsilon=0.2, weight=0.5
      )
      loss_weighted = loss_fn_weighted(
          new_policy_values, old_policy_values, total_return
      )
      assert loss[0].sum() == loss_weighted[0].sum() * 2
  
file_path: coach/rl_coach/tests/architectures/mxnet_components/heads/test_ppo_v_head.py
imports: import mxnet
  import os
  import pytest
  import sys
  from rl_coach.architectures.mxnet_components.heads.ppo_v_head import PPOVHead, PPOVHeadLoss
  from rl_coach.agents.clipped_ppo_agent import ClippedPPOAlgorithmParameters, ClippedPPOAgentParameters
  from rl_coach.spaces import SpacesDefinition, DiscreteActionSpace
label_desc: Use image node_id 3 for calling a global function with example usage: test_ppo_v_head_loss_weight() without return types