code: def test_layer_gradient_linear0(self) -> None:
      model = BasicModel_MultiLayer()
      input = torch.tensor([[5.0, -11.0, 23.0]], requires_grad=True)
      grads, eval = compute_layer_gradients_and_eval(
          model, model.linear0, input, target_ind=0
      )
      assertTensorAlmostEqual(
          self, grads[0], [[4.0, 4.0, 4.0]], delta=0.01, mode="max"
      )
      assertTensorAlmostEqual(
          self,
          eval[0],
          [[5.0, -11.0, 23.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 13 for calling the Test obj's underlying member method code with example usage: obj.test_layer_gradient_linear0() without return types