def METHOD_NAME(res, **kwargs):
    """Like 'json_pp', but skip non-error results without flagged objects.
    """
    # FIXME: I think the proper way to do this is to use 'result_filter',
    # but I couldn't seem to get eval_results to detect the filter when I
    # used
    #
    #      result_renderer = "json_pp"
    #      result_filter = lambda x: ...
    #
    # Also, I want to keep the "message" key for errors.
    from datalad.ui import ui
    to_render = {}
    if res["status"] == "error":
        to_render = dict(res.items())
    elif "report" in res and res["report"]["objects"]:
        to_render = {k: v for k, v in res.items()
                     if k not in ["status", "message", "logger"]}
    if to_render:
        ui.message(json.dumps(to_render, sort_keys=True, indent=2,
                              default=str)
                   )