code: def KORNIA_CHECK_IS_COLOR(
      x: Tensor, msg: Optional[str] = None, raises: bool = True
  ) -> bool:
      """Check whether an image tensor is a color images.
  
      Args:
          x: image tensor to evaluate.
          msg: message to show in the exception.
          raises: bool indicating whether an exception should be raised upon failure.
  
      Raises:
          TypeException: if all the input tensor has not a shape :math:`(3,H,W)` and raises is True.
  
      Example:
          >>> img = torch.rand(2, 3, 4, 4)
          >>> KORNIA_CHECK_IS_COLOR(img, "Image is not color")
          True
      """
      if len(x.shape) < 3 or x.shape[-3] != 3:
          if raises:
              raise TypeError(
                  f"Not a color tensor. Got: {type(x)}.\n{msg}"
              )
          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 10 for calling a global function with example usage: KORNIA_CHECK_IS_COLOR(x, msg, raises) and returns: True, False