code: def KORNIA_CHECK_LAF(laf: Tensor, raises: bool = True) -> bool:
      """Check whether a Local Affine Frame (laf) has a valid shape.
  
      Args:
          laf: local affine frame tensor to evaluate.
          raises: bool indicating whether an exception should be raised upon failure.
  
      Raises:
          Exception: if the input laf does not have a shape :math:`(B,N,2,3)` and raises is True.
  
      Example:
          >>> lafs = torch.rand(2, 10, 2, 3)
          >>> KORNIA_CHECK_LAF(lafs)
          True
      """
      return KORNIA_CHECK_SHAPE(laf, ["B", "N", "2", "3"], raises)
  
imports: from __future__ import annotations
  from typing import Any, Optional, Sequence, TypeVar, cast
  from torch import float16, float32, float64
  from typing_extensions import TypeGuard
  from kornia.core import Tensor
label_desc: Use image node_id 15 for calling a global function with example usage: KORNIA_CHECK_LAF(laf, raises) and returns: KORNIA_CHECK_SHAPE