def METHOD_NAME(ret):
    if not ret.get("fun_args"):
        return "salt func: {}".format(ret["fun"])
    arg_string = " ".join([arg for arg in ret["fun_args"] if isinstance(arg, str)])
    kwarg_string = ""
    if isinstance(ret["fun_args"], list) and len(ret["fun_args"]) > 0:
        kwargs = ret["fun_args"][-1]
        if isinstance(kwargs, dict):
            kwarg_string = " ".join(
                sorted(
                    "{}={}".format(k, v)
                    for k, v in kwargs.items()
                    if not k.startswith("_")
                )
            )
    return "salt func: {fun} {argstr} {kwargstr}".format(
        fun=ret["fun"], argstr=arg_string, kwargstr=kwarg_string
    ).strip()