code: def test_shape(self, device, dtype, size1, size2, alpha, beta, gamma):
      src1 = torch.randn(size1, device=device, dtype=dtype)
      src2 = torch.randn(size2, device=device, dtype=dtype)
      if isinstance(alpha, Tensor):
          alpha = alpha.to(src1)
      if isinstance(beta, Tensor):
          beta = beta.to(src2)
      if isinstance(gamma, Tensor):
          gamma = gamma.to(src1)
      assert_close(
          TestAddWeighted.fcn(src1, alpha, src2, beta, gamma),
          src1 * alpha + src2 * beta + gamma,
      )
  
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 4 for calling the TestAddWeighted obj's underlying member method code with example usage: obj.test_shape(device, dtype, size1, size2, alpha, beta, gamma) without return types