def get_session(self, token_path=None):
<EOL>if token_path is not None:<EOL><INDENT>warnings.warn('<STR_LIT>'<EOL>'<STR_LIT>', DeprecationWarning)<EOL><DEDENT>token = self.token_backend.get_token()<EOL>if token:<EOL><INDENT>client_id, _ = self.auth<EOL>session = OAuth2Session(client_id=client_id, token=token)<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError(<EOL>'<STR_LIT>')<EOL><DEDENT>session.proxies = self.proxy<EOL>if self.request_retries:<EOL><INDENT>retry = Retry(total=self.request_retries, read=self.request_retries,<EOL>connect=self.request_retries,<EOL>backoff_factor=RETRIES_BACKOFF_FACTOR,<EOL>status_forcelist=RETRIES_STATUS_LIST)<EOL>adapter = HTTPAdapter(max_retries=retry)<EOL>session.mount('<STR_LIT>', adapter)<EOL>session.mount('<STR_LIT>', adapter)<EOL><DEDENT>return session<EOL>
Create a requests Session object

        :param Path token_path: (Only oauth) full path to where the token
         should be load from
        :return: A ready to use requests session
        :rtype: OAuth2Session