<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _negotiateAssociation(self, endpoint):
 """Make association requests to the server, attempting to create a new association. @returns: a new association object @rtype: L{openid.association.Association} """

        # Get our preferred session/association type from the negotiatior.
        assoc_type, session_type = self.negotiator.getAllowedType()

        try:
            assoc = self._requestAssociation(endpoint, assoc_type,
                                             session_type)
        except ServerError as why:
            supportedTypes = self._extractSupportedAssociationType(
                why, endpoint, assoc_type)
            if supportedTypes is not None:
                assoc_type, session_type = supportedTypes
                # Attempt to create an association from the assoc_type
                # and session_type that the server told us it
                # supported.
                try:
                    assoc = self._requestAssociation(endpoint, assoc_type,
                                                     session_type)
                except ServerError as why:
                    # Do not keep trying, since it rejected the
                    # association type that it told us to use.
                    logging.error(
                        'Server %s refused its suggested association '
                        'type: session_type=%s, assoc_type=%s' % (
                            endpoint.server_url, session_type, assoc_type))
                    return None
                else:
                    return assoc
        else:
            return assoc