def get_provider(ns, type, backend):
    """
    Returns SSSD provider for given backend.

    :type type: string
    :param type: Type of the provider (= value of its LMI_SSSDProvider.Type
        property).
    :type backend: LMIInstance of LMI_SSSDBackend
    :param backed: SSSD backend to inspect.
    :rtype: string
    :rvalue: The provider module (= value of LMI_SSSDProvider.Module property).
    """
    for provider in backend.associators(AssocClass="LMI_SSSDBackendProvider"):
        if provider.Type == type:
            return provider.Module
    return 'ldap'