def addExtraPermInfo(perms):
    """
    Apply some cleanups/simplifications for more digestable permission indicators by clients.

    - We only include one of moderator/admin (admin if both, moderator if mod but not admin)
    - Don't include moderator/admin at all when both are false
    - We rewrite visible_mod=False to hidden=True (and omit both if not a mod/admin, or not hidden)
    - Don't include banned unless true.
    """
    vis_mod = perms.pop("visible_mod", True)
    if perms["moderator"]:
        if not vis_mod:
            perms["hidden"] = True
        del perms["moderator" if perms["admin"] else "admin"]
    else:
        del perms["moderator"]
        del perms["admin"]
    if not perms["banned"]:
        del perms["banned"]
    return perms