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/rai_test_utils/rai_test_utils/datasets/vision/object_detection_data_utils.py
imports: import os
  import urllib.request
  import xml.etree.ElementTree
  from io import BytesIO
  from urllib.parse import urlparse
  from zipfile import ZipFile
  import numpy
  import pandas
  import requests
  from PIL import Image
  from requests.adapters import HTTPAdapter
  from requests.packages.urllib3.util.retry import Retry
label_desc: Use image node_id 1 for calling a global function with example usage: _get_retry_session(url) and returns: session, _requests_sessions