<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _extract_session_id(ssl_session: nassl._nassl.SSL_SESSION) -> str: """Extract the SSL session ID from a SSL session object or raises IndexError if the session ID was not set. """

        session_string = ((ssl_session.as_text()).split('Session-ID:'))[1]
        session_id = (session_string.split('Session-ID-ctx:'))[0].strip()
        return session_id