code: def grayscale_to_rgb(image: Tensor) -> Tensor:
      r"""Convert a grayscale image to RGB version of image.
  
      .. image:: _static/img/grayscale_to_rgb.png
  
      The image data is assumed to be in the range of (0, 1).
  
      Args:
          image: grayscale image tensor to be converted to RGB with shape :math:`(*,1,H,W)`.
  
      Returns:
          RGB version of the image with shape :math:`(*,3,H,W)`.
  
      Example:
          >>> input = torch.randn(2, 1, 4, 5)
          >>> gray = grayscale_to_rgb(input) # 2x3x4x5
      """
      KORNIA_CHECK_IS_TENSOR(image)
  
      if len(image.shape) < 3 or image.shape[-3] != 1:
          raise ValueError(
              f"Input size must have a shape of (*, 1, H, W). Got {image.shape}."
          )
  
      return concatenate([image, image, image], -3)
  
file_path: kornia/kornia/color/gray.py
imports: from __future__ import annotations
  from typing import Optional
  import torch
  from kornia.color.rgb import bgr_to_rgb
  from kornia.core import Module, Tensor, concatenate
  from kornia.core.check import KORNIA_CHECK_IS_TENSOR
label_desc: Use image node_id 1 for calling a global function with example usage: grayscale_to_rgb(image) and returns: concatenate