def get_friendly(dns_provider_id):
    """
    Retrieves a dns provider by its lemur assigned ID.

    :param dns_provider_id: Lemur assigned ID
    :rtype: DnsProvider
    :return:
    """
    dns_provider = get(dns_provider_id)
    if not dns_provider:
        return None
    dns_provider_friendly = {
        "name": dns_provider.name,
        "description": dns_provider.description,
        "providerType": dns_provider.provider_type,
        "options": dns_provider.options,
        "credentials": dns_provider.credentials,
    }

    if dns_provider.provider_type == "route53":
        dns_provider_friendly["account_id"] = json.loads(dns_provider.credentials).get(
            "account_id"
        )
    return dns_provider_friendly

    Retrieves a dns provider by its lemur assigned ID.

    :param dns_provider_id: Lemur assigned ID
    :rtype: DnsProvider
    :return:
    
lemur/dns_providers/service.py