code: def read_image(file_name, format=None):
      """
      Read an image into the given format.
      Will apply rotation and flipping if the image has such exif information.
  
      Args:
          file_name (str): image file path
          format (str): one of the supported image modes in PIL, or "BGR" or "YUV-BT.601".
  
      Returns:
          image (np.ndarray): an HWC image in the given format, which is 0-255, uint8 for
              supported image modes in PIL or "BGR"; float (0-1 for Y) for YUV-BT.601.
      """
      with open(file_name, "rb") as f:
          image = Image.open(f)
  
          # work around this bug: https://github.com/python-pillow/Pillow/issues/3973
          image = _apply_exif_orientation(image)
  
          return convert_PIL_to_numpy(image, format)
  
imports: import os
  import logging
  import numpy
  from PIL import Image
  import torch
  from ..structures import BitMasks, Boxes, BoxMode, Instances, Keypoints, PolygonMasks, polygons_to_bitmask
  from ..transforms import instance_transforms
  from ..registry.catalog import MetadataCatalog
label_desc: Use image node_id 7 for calling a global function with example usage: read_image(file_name, format) and returns: convert_PIL_to_numpy