code: def fundamental_from_projections(P1: Tensor, P2: Tensor) -> Tensor:
      r"""Get the Fundamental matrix from Projection matrices.
  
      Args:
          P1: The projection matrix from first camera with shape :math:`(*, 3, 4)`.
          P2: The projection matrix from second camera with shape :math:`(*, 3, 4)`.
  
      Returns:
           The fundamental matrix with shape :math:`(*, 3, 3)`.
      """
      if not (len(P1.shape) >= 2 and P1.shape[-2:] == (3, 4)):
          raise AssertionError(P1.shape)
      if not (len(P2.shape) >= 2 and P2.shape[-2:] == (3, 4)):
          raise AssertionError(P2.shape)
      if P1.shape[:-2] != P2.shape[:-2]:
          raise AssertionError
  
      def vstack(x: Tensor, y: Tensor) -> Tensor:
          return concatenate([x, y], dim=-2)
  
      X1 = P1[..., 1:, :]
      X2 = vstack(P1[..., 2:3, :], P1[..., 0:1, :])
      X3 = P1[..., :2, :]
  
      Y1 = P2[..., 1:, :]
      Y2 = vstack(P2[..., 2:3, :], P2[..., 0:1, :])
      Y3 = P2[..., :2, :]
  
      X1Y1, X2Y1, X3Y1 = vstack(X1, Y1), vstack(X2, Y1), vstack(X3, Y1)
      X1Y2, X2Y2, X3Y2 = vstack(X1, Y2), vstack(X2, Y2), vstack(X3, Y2)
      X1Y3, X2Y3, X3Y3 = vstack(X1, Y3), vstack(X2, Y3), vstack(X3, Y3)
  
      F_vec = torch.cat(
          [
              X1Y1.det().reshape(-1, 1),
              X2Y1.det().reshape(-1, 1),
              X3Y1.det().reshape(-1, 1),
              X1Y2.det().reshape(-1, 1),
              X2Y2.det().reshape(-1, 1),
              X3Y2.det().reshape(-1, 1),
              X1Y3.det().reshape(-1, 1),
              X2Y3.det().reshape(-1, 1),
              X3Y3.det().reshape(-1, 1),
          ],
          dim=1,
      )
  
      return F_vec.view(*P1.shape[:-2], 3, 3)
  
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 10 for calling a global function with example usage: fundamental_from_projections(P1, P2) and returns: F_vec, concatenate