code: def get_adapted_session(adapter):
          
          session = requests.Session()
          session.mount("http://", adapter)
          session.mount("https://", adapter)
          return session
docs: Mounts an adapter capable of communication over HTTP or HTTPS to the supplied session.
  
          :param adapter:
              A :class:`requests.adapters.HTTPAdapter` instance
          :return:
              The adapted :class:`requests.Session` instance