@classmethod
def create_from_connection_string(cls, connection_string):
    """
        Create a Provisioning Service Client from a connection string

        :param str connection_string: The connection string for the Device Provisioning Service
        :return: A new instance of :class:`ProvisioningServiceClient
         <provisioningserviceclient.ProvisioningServiceClient>`
        :rtype: :class:`ProvisioningServiceClient
         <provisioningserviceclient.ProvisioningServiceClient>`
        :raises: ValueError if connection string is invalid
        """
    cs_args = connection_string.split(cls._cs_delimiter)
    if len(cs_args) != 3:
        raise ValueError('Too many or too few values in the connection string')
    if len(cs_args) > len(set(cs_args)):
        raise ValueError('Duplicate label in connection string')
    for arg in cs_args:
        tokens = arg.split(cls._cs_val_separator, 1)
        if tokens[0] == cls._host_name_label:
            host_name = tokens[1]
        elif tokens[0] == cls._shared_access_key_name_label:
            shared_access_key_name = tokens[1]
        elif tokens[0] == cls._shared_access_key_label:
            shared_access_key = tokens[1]
        else:
            raise ValueError('Connection string contains incorrect values')
    return cls(host_name, shared_access_key_name, shared_access_key)
