code: def _extractSupportedAssociationType(self, server_error, endpoint,
                                           assoc_type):
          
          # Any error message whose code is not 'unsupported-type'
          # should be considered a total failure.
          if server_error.error_code != 'unsupported-type' or \
                 server_error.message.isOpenID1():
              logging.error(
                  'Server error when requesting an association from %r: %s'
                  % (endpoint.server_url, server_error.error_text))
              return None
  
          # The server didn't like the association/session type
          # that we sent, and it sent us back a message that
          # might tell us how to handle it.
          logging.error(
              'Unsupported association type %s: %s' % (assoc_type,
                                                       server_error.error_text,))
  
          # Extract the session_type and assoc_type from the
          # error message
          assoc_type = server_error.message.getArg(OPENID_NS, 'assoc_type')
          session_type = server_error.message.getArg(OPENID_NS, 'session_type')
  
          if assoc_type is None or session_type is None:
              logging.error('Server responded with unsupported association '
                          'session but did not supply a fallback.')
              return None
          elif not self.negotiator.isAllowed(assoc_type, session_type):
              fmt = ('Server sent unsupported session/association type: '
                     'session_type=%s, assoc_type=%s')
              logging.error(fmt % (session_type, assoc_type))
              return None
          else:
              return assoc_type, session_type
docs: Handle ServerErrors resulting from association requests.
  
          @returns: If server replied with an C{unsupported-type} error,
              return a tuple of supported C{association_type}, C{session_type}.
              Otherwise logs the error and returns None.
          @rtype: tuple or None