code: def prepare_for_negotiated_authenticate(
              self, entityid=None, relay_state="", binding=None, vorg="",
              nameid_format=None, scoping=None, consent=None, extensions=None,
              sign=None, response_binding=saml2.BINDING_HTTP_POST, **kwargs):
          
  
          expected_binding = binding
  
          for binding in [BINDING_HTTP_REDIRECT, BINDING_HTTP_POST]:
              if expected_binding and binding != expected_binding:
                  continue
  
              destination = self._sso_location(entityid, binding)
              logger.info("destination to provider: %s", destination)
  
              reqid, request = self.create_authn_request(
                  destination, vorg, scoping, response_binding, nameid_format,
                  consent=consent, extensions=extensions, sign=sign,
                  **kwargs)
  
              _req_str = str(request)
  
              logger.info("AuthNReq: %s", _req_str)
  
              try:
                  args = {'sigalg': kwargs["sigalg"]}
              except KeyError:
                  args = {}
  
              http_info = self.apply_binding(binding, _req_str, destination,
                                             relay_state, sign=sign, **args)
  
              return reqid, binding, http_info
          else:
              raise SignOnError(
                  "No supported bindings available for authentication")
docs: Makes all necessary preparations for an authentication request
          that negotiates which binding to use for authentication.
  
          :param entityid: The entity ID of the IdP to send the request to
          :param relay_state: To where the user should be returned after
              successfull log in.
          :param binding: Which binding to use for sending the request
          :param vorg: The entity_id of the virtual organization I'm a member of
          :param nameid_format:
          :param scoping: For which IdPs this query are aimed.
          :param consent: Whether the principal have given her consent
          :param extensions: Possible extensions
          :param sign: Whether the request should be signed or not.
          :param response_binding: Which binding to use for receiving the response
          :param kwargs: Extra key word arguments
          :return: session id and AuthnRequest info