def METHOD_NAME(
    name, password, email, is_admin=False, fullname=None, theme=None, profile="grafana"
):
    """
    Ensure that a user is present.
    name
        Name of the user.
    password
        Password of the user.
    email
        Email of the user.
    is_admin
        Optional - Set user as admin user. Default: False
    fullname
        Optional - Full name of the user.
    theme
        Optional - Selected theme of the user.
    profile
        Configuration profile used to connect to the Grafana instance.
        Default is 'grafana'.
    """
    if isinstance(profile, str):
        profile = __salt__["config.option"](profile)
    ret = {"name": name, "result": None, "comment": None, "changes": {}}
    user = __salt__["grafana4.get_user"](name, profile)
    create = not user
    if create:
        if __opts__["test"]:
            ret["comment"] = "User {} will be created".format(name)
            return ret
        __salt__["grafana4.create_user"](
            login=name, password=password, email=email, name=fullname, profile=profile
        )
        user = __salt__["grafana4.get_user"](name, profile)
        ret["changes"]["new"] = user
    user_data = __salt__["grafana4.get_user_data"](user["id"], profile=profile)
    data = _get_json_data(
        login=name, email=email, name=fullname, theme=theme, defaults=user_data
    )
    if data != _get_json_data(
        login=None, email=None, name=None, theme=None, defaults=user_data
    ):
        if __opts__["test"]:
            ret["comment"] = "User {} will be updated".format(name)
            return ret
        __salt__["grafana4.update_user"](user["id"], profile=profile, **data)
        dictupdate.update(
            ret["changes"],
            deep_diff(user_data, __salt__["grafana4.get_user_data"](user["id"])),
        )
    if user["isAdmin"] != is_admin:
        if __opts__["test"]:
            ret["comment"] = "User {} isAdmin status will be updated".format(name)
            return ret
        __salt__["grafana4.update_user_permissions"](
            user["id"], isGrafanaAdmin=is_admin, profile=profile
        )
        dictupdate.update(
            ret["changes"],
            deep_diff(user, __salt__["grafana4.get_user"](name, profile)),
        )
    ret["result"] = True
    if create:
        ret["changes"] = ret["changes"]["new"]
        ret["comment"] = "New user {} added".format(name)
    else:
        if ret["changes"]:
            ret["comment"] = "User {} updated".format(name)
        else:
            ret["changes"] = {}
            ret["comment"] = "User {} already up-to-date".format(name)
    return ret