code: def test_gradient_target_list(self) -> None:
      model = BasicModel2()
      input1 = torch.tensor(
          [[4.0, -1.0], [3.0, 10.0]], requires_grad=True
      )
      input2 = torch.tensor(
          [[2.0, -5.0], [-2.0, 1.0]], requires_grad=True
      )
      grads = compute_gradients(
          model, (input1, input2), target_ind=[0, 1]
      )
      assertTensorAlmostEqual(
          self,
          grads[0],
          [[1.0, 0.0], [0.0, 1.0]],
          delta=0.01,
          mode="max",
      )
      assertTensorAlmostEqual(
          self,
          grads[1],
          [[-1.0, 0.0], [0.0, -1.0]],
          delta=0.01,
          mode="max",
      )
  
imports: from typing import List, Tuple
  import torch
  from captum._utils.gradient import apply_gradient_requirements, compute_gradients, compute_layer_gradients_and_eval, undo_gradient_requirements
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicModel, BasicModel2, BasicModel4_MultiArgs, BasicModel5_MultiArgs, BasicModel6_MultiTensor, BasicModel_MultiLayer
label_desc: Use image node_id 9 for calling the Test obj's underlying member method code with example usage: obj.test_gradient_target_list() without return types