code: def _get_retry_session(url):
      domain = urlparse(url.lower()).netloc
      if domain in _requests_sessions:
          return _requests_sessions[domain]
  
      session = requests.Session()
      retries = Retry(
          total=5,
          backoff_factor=1,
          status_forcelist=[500, 502, 503, 504],
      )
      session.mount("http://", HTTPAdapter(max_retries=retries))
      session.mount("https://", HTTPAdapter(max_retries=retries))
      _requests_sessions[domain] = session
  
      return session
  
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 1 for calling a global function with example usage: _get_retry_session(url) and returns: session, _requests_sessions