prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  expose `average_endpoint_error` on `kornia.metrics.__init__.py`
                can you expose it on kornia.metrics.__init__.py ? - to use as `kornia.metrics.average_endpoint_error` too
  
  _Originally posted by @johnnv1 in https://github.com/kornia/kornia/pull/2615#discussion_r1351007042_
              
  
  </issue>
  <code>
  [start of kornia/metrics/__init__.py]
  1 from .accuracy import accuracy
  2 from .average_meter import AverageMeter
  3 from .confusion_matrix import confusion_matrix
  4 from .endpoint_error import AEPE, aepe
  5 from .mean_average_precision import mean_average_precision
  6 from .mean_iou import mean_iou, mean_iou_bbox
  7 from .psnr import psnr
  8 from .ssim import SSIM, ssim
  9 from .ssim3d import SSIM3D, ssim3d
  10 
  11 __all__ = [
  12     "accuracy",
  13     "AverageMeter",
  14     "confusion_matrix",
  15     "aepe",
  16     "AEPE",
  17     "mean_iou",
  18     "mean_iou_bbox",
  19     "mean_average_precision",
  20     "psnr",
  21     "ssim",
  22     "ssim3d",
  23     "SSIM",
  24     "SSIM3D",
  25 ]
  26
  [end of kornia/metrics/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/kornia/metrics/__init__.py b/kornia/metrics/__init__.py
  --- a/kornia/metrics/__init__.py
  +++ b/kornia/metrics/__init__.py
  @@ -1,7 +1,7 @@
   from .accuracy import accuracy
   from .average_meter import AverageMeter
   from .confusion_matrix import confusion_matrix
  -from .endpoint_error import AEPE, aepe
  +from .endpoint_error import AEPE, aepe, average_endpoint_error
   from .mean_average_precision import mean_average_precision
   from .mean_iou import mean_iou, mean_iou_bbox
   from .psnr import psnr
  @@ -14,6 +14,7 @@
       "confusion_matrix",
       "aepe",
       "AEPE",
  +    "average_endpoint_error",
       "mean_iou",
       "mean_iou_bbox",
       "mean_average_precision",
  
verification_info: {"golden_diff": "diff --git a/kornia/metrics/__init__.py b/kornia/metrics/__init__.py\n--- a/kornia/metrics/__init__.py\n+++ b/kornia/metrics/__init__.py\n@@ -1,7 +1,7 @@\n from .accuracy import accuracy\n from .average_meter import AverageMeter\n from .confusion_matrix import confusion_matrix\n-from .endpoint_error import AEPE, aepe\n+from .endpoint_error import AEPE, aepe, average_endpoint_error\n from .mean_average_precision import mean_average_precision\n from .mean_iou import mean_iou, mean_iou_bbox\n from .psnr import psnr\n@@ -14,6 +14,7 @@\n     \"confusion_matrix\",\n     \"aepe\",\n     \"AEPE\",\n+    \"average_endpoint_error\",\n     \"mean_iou\",\n     \"mean_iou_bbox\",\n     \"mean_average_precision\",\n", "issue": "expose `average_endpoint_error` on `kornia.metrics.__init__.py`\n              can you expose it on kornia.metrics.__init__.py ? - to use as `kornia.metrics.average_endpoint_error` too\r\n\r\n_Originally posted by @johnnv1 in https://github.com/kornia/kornia/pull/2615#discussion_r1351007042_\r\n            \n", "before_files": [{"content": "from .accuracy import accuracy\nfrom .average_meter import AverageMeter\nfrom .confusion_matrix import confusion_matrix\nfrom .endpoint_error import AEPE, aepe\nfrom .mean_average_precision import mean_average_precision\nfrom .mean_iou import mean_iou, mean_iou_bbox\nfrom .psnr import psnr\nfrom .ssim import SSIM, ssim\nfrom .ssim3d import SSIM3D, ssim3d\n\n__all__ = [\n    \"accuracy\",\n    \"AverageMeter\",\n    \"confusion_matrix\",\n    \"aepe\",\n    \"AEPE\",\n    \"mean_iou\",\n    \"mean_iou_bbox\",\n    \"mean_average_precision\",\n    \"psnr\",\n    \"ssim\",\n    \"ssim3d\",\n    \"SSIM\",\n    \"SSIM3D\",\n]\n", "path": "kornia/metrics/__init__.py"}]}