code: def test_v_head_loss_weight():
      target_values = mx.nd.array((3, -1, 0))
      pred_values = mx.nd.array((0, 0, 1))
      loss_fn = VHeadLoss()
      loss = loss_fn(pred_values, target_values)
      loss_fn_weighted = VHeadLoss(weight=0.5)
      loss_weighted = loss_fn_weighted(pred_values, target_values)
      assert loss[0] == loss_weighted[0] * 2
  
file_path: coach/rl_coach/tests/architectures/mxnet_components/heads/test_v_head.py
imports: import mxnet
  import os
  import pytest
  import sys
  from rl_coach.architectures.mxnet_components.heads.v_head import VHead, VHeadLoss
  from rl_coach.agents.clipped_ppo_agent import ClippedPPOAlgorithmParameters, ClippedPPOAgentParameters
  from rl_coach.spaces import SpacesDefinition, DiscreteActionSpace
label_desc: Use image node_id 2 for calling a global function with example usage: test_v_head_loss_weight() without return types