code: def test_get_max_q_values_with_target(self):
      q_values = torch.tensor([[3.0, 4.0]])
      q_values_target = torch.tensor([[2.0, 1.0]])
      trainer = self._construct_trainer()
  
      # double q-learning (default)
      possible_actions_mask = torch.ones(q_values.shape)
      (
          max_q_values_target,
          max_indicies,
      ) = trainer.get_max_q_values_with_target(
          q_values, q_values_target, possible_actions_mask
      )
      self.assertEqual(max_indicies, torch.tensor([[1]]))
      self.assertEqual(max_q_values_target, torch.tensor([[1.0]]))
  
      # mask out max-value action
      possible_actions_mask = torch.tensor([[1, 0]])
      (
          max_q_values_target,
          max_indicies,
      ) = trainer.get_max_q_values_with_target(
          q_values, q_values_target, possible_actions_mask
      )
      self.assertEqual(max_indicies, torch.tensor([[0]]))
      self.assertEqual(max_q_values_target, torch.tensor([[2.0]]))
  
      # simple q-learning
      trainer.double_q_learning = False
      possible_actions_mask = torch.ones(q_values.shape)
      (
          max_q_values_target,
          max_indicies,
      ) = trainer.get_max_q_values_with_target(
          q_values, q_values_target, possible_actions_mask
      )
      self.assertEqual(max_indicies, torch.tensor([[0]]))
      self.assertEqual(max_q_values_target, torch.tensor([[2.0]]))
  
      # mask out max-value action
      possible_actions_mask = torch.tensor([[0, 1]])
      (
          max_q_values_target,
          max_indicies,
      ) = trainer.get_max_q_values_with_target(
          q_values, q_values_target, possible_actions_mask
      )
      self.assertEqual(max_indicies, torch.tensor([[1]]))
      self.assertEqual(max_q_values_target, torch.tensor([[1.0]]))
  
imports: import unittest
  from typing import List, Optional, Tuple
  import torch
  from reagent.core.parameters import EvaluationParameters, RLParameters
  from reagent.core.torch_utils import masked_softmax
  from reagent.core.types import DiscreteDqnInput, ExtraData, FeatureData
  from reagent.evaluation.evaluation_data_page import EvaluationDataPage
  from reagent.evaluation.evaluator import get_metrics_to_score
  from reagent.models.dqn import FullyConnectedDQN
  from reagent.training.dqn_trainer_base import DQNTrainerBaseLightning
  from reagent.training.parameters import DQNTrainerParameters
  from reagent.workflow.types import RewardOptions
label_desc: Use image node_id 3 for calling the TestDQNTrainerBaseLightning obj's underlying member method code with example usage: obj.test_get_max_q_values_with_target() without return types