def set_nfs_domain(session, domain, return_type=None, **kwargs):
    """
    Sets the NFS domain for the VPSA.  This is used in conjunction with
    the idmap service on the client and NAS Users on the VPSA to correctly
    map local users to VPSA users.

    :type session: zadarapy.session.Session
    :param session: A valid zadarapy.session.Session object.  Required.

    :type domain: str
    :param domain: The NFS domain to set.  This must be a valid DNS domain
        name.  Set to 'localdomain' by default.

    :type return_type: str
    :param return_type: If this is set to the string 'json', this function
        will return a JSON string.  Otherwise, it will return a Python
        dictionary.  Optional (will return a Python dictionary by default).

    :rtype: dict, str
    :returns: A dictionary or JSON data set as a string depending on
        return_type parameter.
    """
    body_values = {'domain': domain}
    path = '/api/settings/nfs_domain.json'
    return session.post_api(path=path, body=body_values, return_type=
        return_type, **kwargs)
