code: def get_image_pointer_from_path(image_path):
      """Get image pointer from path.
  
      :param image_path: The path to the image.
      :type image_path: str
      :return: The image open pointer.
      :rtype: str or bytes
      """
      image_open_pointer = image_path
      if image_path.startswith("http://") or image_path.startswith(
          "https://"
      ):
          response = _get_retry_session(image_path).get(image_path)
          image_open_pointer = BytesIO(response.content)
      return image_open_pointer
  
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 2 for calling a global function with example usage: get_image_pointer_from_path(image_path) and returns: image_open_pointer