code: def get_image_from_path(image_path, image_mode):
      """Get image from path.
  
      :param image_path: The path to the image.
      :type image_path: str
      :param image_mode: The mode to open the image in.
          See pillow documentation for all modes:
          https://pillow.readthedocs.io/en/stable/handbook/concepts.html
      :type image_mode: str
      :return: The image as a numpy array.
      :rtype: numpy.ndarray
      """
      image_open_pointer = get_image_pointer_from_path(image_path)
      with Image.open(image_open_pointer) as im:
          if image_mode is not None:
              im = im.convert(image_mode)
          image_array = asarray(im)
      return image_array
  
file_path: responsible-ai-toolbox/responsibleai_vision/responsibleai_vision/utils/image_reader.py
imports: import base64
  from io import BytesIO
  from typing import Any, Tuple, Union
  from urllib.parse import urlparse
  import requests
  from numpy import asarray
  from PIL import Image
  from PIL.ExifTags import TAGS
  from requests.adapters import HTTPAdapter, Retry
  from responsibleai_vision.common.constants import AutoMLImagesModelIdentifier, CommonTags
label_desc: Use image node_id 3 for calling a global function with example usage: get_image_from_path(image_path, image_mode) and returns: image_array