code: def request(self, method, url, **kwargs):
          
          auth = None
          if self._username is not None and self._password is not None:
              auth = (self._username, self._password)
  
          return super(BasicSession, self).request(
              method, url, auth=auth, **kwargs)
docs: Overrides ``requests.Session.request`` to provide basic access
          authentication.