code: def fundamental_from_essential(
      E_mat: Tensor, K1: Tensor, K2: Tensor
  ) -> Tensor:
      r"""Get the Fundamental matrix from Essential and camera matrices.
  
      Uses the method from Hartley/Zisserman 9.6 pag 257 (formula 9.12).
  
      Args:
          E_mat: The essential matrix with shape of :math:`(*, 3, 3)`.
          K1: The camera matrix from first camera with shape :math:`(*, 3, 3)`.
          K2: The camera matrix from second camera with shape :math:`(*, 3, 3)`.
  
      Returns:
          The fundamental matrix with shape :math:`(*, 3, 3)`.
      """
      if not (len(E_mat.shape) >= 2 and E_mat.shape[-2:] == (3, 3)):
          raise AssertionError(E_mat.shape)
      if not (len(K1.shape) >= 2 and K1.shape[-2:] == (3, 3)):
          raise AssertionError(K1.shape)
      if not (len(K2.shape) >= 2 and K2.shape[-2:] == (3, 3)):
          raise AssertionError(K2.shape)
      if (
          not len(E_mat.shape[:-2])
          == len(K1.shape[:-2])
          == len(K2.shape[:-2])
      ):
          raise AssertionError
  
      return K2.inverse().transpose(-2, -1) @ E_mat @ K1.inverse()
  
file_path: kornia/kornia/geometry/epipolar/fundamental.py
imports: from typing import Literal, Optional, Tuple
  import torch
  from kornia.core import Tensor, concatenate, ones_like, stack, where, zeros
  from kornia.core.check import KORNIA_CHECK_SHAPE
  from kornia.geometry.conversions import convert_points_from_homogeneous, convert_points_to_homogeneous
  from kornia.geometry.linalg import transform_points
  from kornia.geometry.solvers import solve_cubic
  from kornia.utils.helpers import _torch_svd_cast
label_desc: Use image node_id 9 for calling a global function with example usage: fundamental_from_essential(E_mat, K1, K2) and returns: unknown