code: def test_homography_warper(self, batch_size, device, dtype):
      # generate input data
      height, width = 128, 64
      eye_size = 3  # identity 3x3
  
      patch_src = torch.ones(
          batch_size, 1, height, width, device=device, dtype=dtype
      )
  
      # create base homography
      dst_homo_src = utils.create_eye_batch(
          batch_size, eye_size, device=device, dtype=dtype
      )
  
      # instantiate warper
      warper = kornia.geometry.transform.HomographyWarper(
          height, width, align_corners=True
      )
  
      for _ in range(self.num_tests):
          # generate homography noise
          homo_delta = torch.rand_like(dst_homo_src) * 0.3
  
          dst_homo_src_i = dst_homo_src + homo_delta
  
          # transform the points from dst to ref
          patch_dst = warper(patch_src, dst_homo_src_i)
          patch_dst_to_src = warper(
              patch_dst, _torch_inverse_cast(dst_homo_src_i)
          )
  
          # same transform precomputing the grid
          warper.precompute_warp_grid(
              _torch_inverse_cast(dst_homo_src_i)
          )
          patch_dst_to_src_precomputed = warper(patch_dst)
          assert_close(
              patch_dst_to_src_precomputed,
              patch_dst_to_src,
              atol=1e-4,
              rtol=1e-4,
          )
  
          # projected should be equal as initial
          error = utils.compute_patch_error(
              patch_src, patch_dst_to_src, height, width
          )
  
          assert error.item() < self.threshold
  
          # check functional api
          patch_dst_to_src_functional = (
              kornia.geometry.transform.homography_warp(
                  patch_dst,
                  _torch_inverse_cast(dst_homo_src_i),
                  (height, width),
                  align_corners=True,
              )
          )
  
          assert_close(
              patch_dst_to_src,
              patch_dst_to_src_functional,
              atol=1e-4,
              rtol=1e-4,
          )
  
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.testing
  from kornia.testing import assert_close
  from kornia.utils.helpers import _torch_inverse_cast
label_desc: Use image node_id 11 for calling the TestHomographyWarper obj's underlying member method code with example usage: obj.test_homography_warper(batch_size, device, dtype) without return types