code: def _extract_session_id(ssl_session: nassl._nassl.SSL_SESSION) -> str:
          
          session_string = ((ssl_session.as_text()).split('Session-ID:'))[1]
          session_id = (session_string.split('Session-ID-ctx:'))[0].strip()
          return session_id
docs: Extract the SSL session ID from a SSL session object or raises IndexError if the session ID was not set.