def signed_session(self, session=None):
        # type: (Optional[requests.Session]) -> requests.Session
        """Create requests session with any required auth headers
        applied.

        If a session object is provided, configure it directly. Otherwise,
        create a new session and return it.

        :param session: The session to configure for authentication
        :type session: requests.Session
        :rtype: requests.Session
        """
        session = super(BasicTokenAuthentication, self).signed_session(session)
        header = "{} {}".format(self.scheme, self.token['access_token'])
        session.headers['Authorization'] = header
        return session
def signed_session ( self , session = None ) : session = super ( BasicTokenAuthentication , self ) . signed_session ( session ) header = "{} {}" . format ( self . scheme , self . token [ 'access_token' ] ) session . headers [ 'Authorization' ] = header return session
Create requests session with any required auth headers
        applied.

        If a session object is provided, configure it directly. Otherwise,
        create a new session and return it.

        :param session: The session to configure for authentication
        :type session: requests.Session
        :rtype: requests.Session