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 = session or requests.Session()  # Don't call super on purpose, let's "auth" manage the headers.
        session.auth = oauth.OAuth2(self.id, token=self.token)
        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