code: def test_gradcheck(self, size, device, dtype):
      src1, src2, alpha, beta, gamma = self.get_input(
          device, dtype, size=3, max_elem=5
      )  # to shave time on gradcheck
      src1 = utils.tensor_to_gradcheck_var(src1)  # to var
      src2 = utils.tensor_to_gradcheck_var(src2)  # to var
      assert gradcheck(
          kornia.enhance.AddWeighted(alpha, beta, gamma),
          (src1, src2),
          raise_exception=True,
          fast_mode=True,
      )
  
file_path: kornia/test/enhance/test_core.py
imports: import random
  import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.testing
  from kornia.core import Tensor
  from kornia.testing import assert_close
label_desc: Use image node_id 6 for calling the TestAddWeighted obj's underlying member method code with example usage: obj.test_gradcheck(size, device, dtype) without return types