code: def convert_points_from_homogeneous(
      points: Tensor, eps: float = 1e-8
  ) -> Tensor:
      r"""Function that converts points from homogeneous to Euclidean space.
  
      Args:
          points: the points to be transformed of shape :math:`(B, N, D)`.
          eps: to avoid division by zero.
  
      Returns:
          the points in Euclidean space :math:`(B, N, D-1)`.
  
      Examples:
          >>> input = tensor([[0., 0., 1.]])
          >>> convert_points_from_homogeneous(input)
          tensor([[0., 0.]])
      """
      if not isinstance(points, Tensor):
          raise TypeError(
              f"Input type is not a Tensor. Got {type(points)}"
          )
  
      if len(points.shape) < 2:
          raise ValueError(
              f"Input must be at least a 2D tensor. Got {points.shape}"
          )
  
      # we check for points at max_val
      z_vec: Tensor = points[..., -1:]
  
      # set the results of division by zeror/near-zero to 1.0
      # follow the convention of opencv:
      # https://github.com/opencv/opencv/pull/14411/files
      mask: Tensor = torch.abs(z_vec) > eps
      scale = where(mask, 1.0 / (z_vec + eps), torch.ones_like(z_vec))
  
      return scale * points[..., :-1]
  
imports: from __future__ import annotations
  from typing import Optional
  import torch
  import torch.nn.functional
  from kornia.constants import pi
  from kornia.core import Tensor, concatenate, cos, pad, sin, stack, tensor, where, zeros_like
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_SHAPE
  from kornia.utils import deprecated
  from kornia.utils.helpers import _torch_inverse_cast
label_desc: Use image node_id 5 for calling a global function with example usage: convert_points_from_homogeneous(points, eps) and returns: unknown