code: def _mean_isotropic_scale_normalize(
      points: torch.Tensor, eps: float = 1e-8
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      r"""Normalizes points.
  
      Args:
         points : Tensor containing the points to be normalized with shape :math:`(B, N, D)`.
         eps : Small value to avoid division by zero error.
  
      Returns:
         Tuple containing the normalized points in the shape :math:`(B, N, D)` and the transformation matrix
         in the shape :math:`(B, D+1, D+1)`.
      """
      if not isinstance(points, torch.Tensor):
          raise AssertionError(
              f"points is not an instance of torch.Tensor. Type of points is {type(points)}"
          )
  
      if len(points.shape) != 3:
          raise AssertionError(
              f"points must be of shape (B, N, D). Got shape {points.shape}."
          )
  
      x_mean = torch.mean(points, dim=1, keepdim=True)  # Bx1xD
      scale = (points - x_mean).norm(dim=-1, p=2).mean(dim=-1)  # B
  
      D_int = points.shape[-1]
      D_float = torch.tensor(
          points.shape[-1], dtype=torch.float64, device=points.device
      )
      scale = torch.sqrt(D_float) / (scale + eps)  # B
      transform = eye_like(D_int + 1, points)  # (B, D+1, D+1)
  
      idxs = arange(D_int, dtype=torch.int64, device=points.device)
      transform[:, idxs, idxs] = (
          transform[:, idxs, idxs] * scale[:, None]
      )
      transform[:, idxs, D_int] = transform[:, idxs, D_int] + (
          -scale[:, None] * x_mean[:, 0, idxs]
      )
  
      points_norm = transform_points(transform, points)  # BxNxD
  
      return (points_norm, transform)
  
file_path: kornia/kornia/geometry/calibration/pnp.py
imports: from typing import Optional, Tuple
  import torch
  from torch.linalg import qr
  from kornia.core import arange, ones_like, where, zeros
  from kornia.geometry.conversions import convert_points_to_homogeneous
  from kornia.geometry.linalg import transform_points
  from kornia.utils import eye_like
  from kornia.utils.helpers import _torch_linalg_svdvals
label_desc: Use image node_id 1 for calling a global function with example usage: _mean_isotropic_scale_normalize(points, eps) and returns: points_norm,  transform