def create_client(self, userid="", **kwargs):
        """
        Do an instantiation of a client instance

        :param userid: An identifier of the user
        :param: Keyword arguments
            Keys are ["srv_discovery_url", "client_info", "client_registration",
            "provider_info"]
        :return: client instance
        """

        _key_set = set(list(kwargs.keys()))
        try:
            _verify_ssl = kwargs['verify_ssl']
        except __HOLE__:
            _verify_ssl = self.verify_ssl
        else:
            _key_set.discard('verify_ssl')

        client = self.client_cls(client_authn_method=CLIENT_AUTHN_METHOD,
                                 behaviour=kwargs["behaviour"],
                                 verify_ssl=_verify_ssl)

        try:
            client.userinfo_request_method = kwargs["userinfo_request_method"]
        except KeyError:
            pass
        else:
            _key_set.discard("userinfo_request_method")

        # The behaviour parameter is not significant for the election process
        _key_set.discard("behaviour")
        for param in ["allow"]:
            try:
                setattr(client, param, kwargs[param])
            except KeyError:
                pass
            else:
                _key_set.discard(param)

        if _key_set == {"client_info"}:  # Everything dynamic
            # There has to be a userid
            if not userid:
                raise MissingAttribute("Missing userid specification")

            # Find the service that provides information about the OP
            issuer = client.wf.discovery_query(userid)
            # Gather OP information
            pcr = client.provider_config(issuer)
            # register the client
            client.register(client.provider_info["registration_endpoint"],
                            **kwargs["client_info"])
            self.get_path(kwargs['client_info']['redirect_uris'], issuer)
        elif _key_set == set(["client_info", "srv_discovery_url"]):
            # Ship the webfinger part
            # Gather OP information
            _ = client.provider_config(kwargs["srv_discovery_url"])
            # register the client
            _ = client.register(client.provider_info["registration_endpoint"],
                                **kwargs["client_info"])
            self.get_path(kwargs['client_info']['redirect_uris'],
                          kwargs["srv_discovery_url"])
        elif _key_set == set(["provider_info", "client_info"]):
            client.handle_provider_config(
                ProviderConfigurationResponse(**kwargs["provider_info"]),
                kwargs["provider_info"]["issuer"])
            _ = client.register(client.provider_info["registration_endpoint"],
                                **kwargs["client_info"])

            self.get_path(kwargs['client_info']['redirect_uris'],
                          kwargs["provider_info"]["issuer"])
        elif _key_set == set(["provider_info", "client_registration"]):
            client.handle_provider_config(
                ProviderConfigurationResponse(**kwargs["provider_info"]),
                kwargs["provider_info"]["issuer"])
            client.store_registration_info(RegistrationResponse(
                **kwargs["client_registration"]))
            self.get_path(kwargs['client_info']['redirect_uris'],
                          kwargs["provider_info"]["issuer"])
        elif _key_set == set(["srv_discovery_url", "client_registration"]):
            _ = client.provider_config(kwargs["srv_discovery_url"])
            client.store_registration_info(RegistrationResponse(
                **kwargs["client_registration"]))
            self.get_path(kwargs['client_registration']['redirect_uris'],
                          kwargs["srv_discovery_url"])
        else:
            raise Exception("Configuration error ?")

        return client
dataset/ETHPy150Open rohe/pyoidc/src/oic/utils/rp/__init__.py/OIDCClients.create_client