code: def KORNIA_CHECK_SAME_SHAPE(
      x: Tensor, y: Tensor, raises: bool = True
  ) -> bool:
      """Check whether two tensor have the same shape.
  
      Args:
          x: first tensor to evaluate.
          y: sencod tensor to evaluate.
          msg: message to show in the exception.
          raises: bool indicating whether an exception should be raised upon failure.
  
      Raises:
          TypeException: if the two tensors have not the same shape and raises is True.
  
      Example:
          >>> x1 = torch.rand(2, 3, 3)
          >>> x2 = torch.rand(2, 3, 3)
          >>> KORNIA_CHECK_SAME_SHAPE(x1, x2)
          True
      """
      if x.shape != y.shape:
          if raises:
              raise TypeError(
                  f"Not same shape for tensors. Got: {x.shape} and {y.shape}"
              )
          return False
      return True
  
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 9 for calling a global function with example usage: KORNIA_CHECK_SAME_SHAPE(x, y, raises) and returns: True, False