code: def test_gradcheck(self, batch_size, device, dtype):
      H, W = 10, 20
      fx, fy = W, H
      cx, cy = W / 2, H / 2
      seed = 77
      low_1, high_1 = -500, 500
      low_2, high_2 = -(max(W, H) * 3), (max(W, H) * 3)
  
      torch.manual_seed(seed)
      depth = self._get_samples(
          (batch_size, 1, H, W), low_1, high_1, device, dtype
      )
      pixel_coords = self._get_samples(
          (batch_size, H, W, 2), low_2, high_2, device, dtype
      )
  
      last_ch = torch.ones(
          (batch_size, H, W, 1), device=device, dtype=dtype
      )
      pixel_coords_input = torch.cat([pixel_coords, last_ch], axis=-1)
  
      # If contiguous() is not called, gradcheck fails
      intrinsics_inv = self._create_intrinsics_inv(
          batch_size, fx, fy, cx, cy, device=device, dtype=dtype
      ).contiguous()
  
      depth = tensor_to_gradcheck_var(depth)
      intrinsics_inv = tensor_to_gradcheck_var(intrinsics_inv)
      pixel_coords_input = tensor_to_gradcheck_var(pixel_coords_input)
  
      assert gradcheck(
          kornia.geometry.camera.pixel2cam,
          (depth, intrinsics_inv, pixel_coords_input),
          raise_exception=True,
      )
  
imports: import math
  import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  from kornia.testing import assert_close, tensor_to_gradcheck_var
label_desc: Use image node_id 6 for calling the TestPixel2Cam obj's underlying member method code with example usage: obj.test_gradcheck(batch_size, device, dtype) without return types