code: def oneway_transfer_error(
      pts1: Tensor,
      pts2: Tensor,
      H: Tensor,
      squared: bool = True,
      eps: float = 1e-8,
  ) -> Tensor:
      r"""Return transfer error in image 2 for correspondences given the homography matrix.
  
      Args:
          pts1: correspondences from the left images with shape
            (B, N, 2 or 3). If they are homogeneous, converted automatically.
          pts2: correspondences from the right images with shape
            (B, N, 2 or 3). If they are homogeneous, converted automatically.
          H: Homographies with shape :math:`(B, 3, 3)`.
          squared: if True (default), the squared distance is returned.
          eps: Small constant for safe sqrt.
  
      Returns:
          the computed distance with shape :math:`(B, N)`.
      """
      KORNIA_CHECK_SHAPE(H, ["B", "3", "3"])
  
      if pts1.size(-1) == 3:
          pts1 = convert_points_from_homogeneous(pts1)
  
      if pts2.size(-1) == 3:
          pts2 = convert_points_from_homogeneous(pts2)
  
      # From Hartley and Zisserman, Error in one image (4.6)
      # dist = \sum_{i} ( d(x', Hx)**2)
      pts1_in_2: Tensor = transform_points(H, pts1)
      error_squared: Tensor = (pts1_in_2 - pts2).pow(2).sum(dim=-1)
      if squared:
          return error_squared
      return (error_squared + eps).sqrt()
  
file_path: kornia/kornia/geometry/homography.py
imports: import warnings
  from typing import Optional, Tuple
  import torch
  from kornia.core import Tensor
  from kornia.core.check import KORNIA_CHECK_SHAPE
  from kornia.utils import _extract_device_dtype, safe_inverse_with_mask, safe_solve_with_mask
  from kornia.utils.helpers import _torch_svd_cast
  from .conversions import convert_points_from_homogeneous, convert_points_to_homogeneous
  from .epipolar import normalize_points
  from .linalg import transform_points
label_desc: Use image node_id 1 for calling a global function with example usage: oneway_transfer_error(pts1, pts2, H, squared, eps) and returns: unknown, error_squared