code: def read_image(
      path: str, mode: ImageReadMode = ImageReadMode.UNCHANGED
  ) -> torch.Tensor:
      """
      Reads a JPEG or PNG image into a 3 dimensional RGB or grayscale Tensor.
      Optionally converts the image to the desired format.
      The values of the output tensor are uint8 in [0, 255].
  
      Args:
          path (str): path of the JPEG or PNG image.
          mode (ImageReadMode): the read mode used for optionally converting the image.
              Default: ``ImageReadMode.UNCHANGED``.
              See ``ImageReadMode`` class for more information on various
              available modes.
  
      Returns:
          output (Tensor[image_channels, image_height, image_width])
      """
      if not torch.jit.is_scripting() and not torch.jit.is_tracing():
          _log_api_usage_once(read_image)
      data = read_file(path)
      return decode_image(data, mode)
  
file_path: vision/torchvision/io/image.py
imports: from enum import Enum
  from warnings import warn
  import torch
  from ..extension import _load_library
  from ..utils import _log_api_usage_once
label_desc: Use image node_id 10 for calling a global function with example usage: read_image(path, mode) and returns: decode_image