def METHOD_NAME(old_gr):
    def revert():
        reverted_gr = admin_mc.client.update_by_id_global_role(
            id=old_gr.id,
            displayName=old_gr.name,
            description=old_gr.description,
            rules=old_gr.rules,
            newUserDefault=old_gr.newUserDefault,
            builtin=old_gr.builtin)
        assert reverted_gr.name == old_gr.name
        assert reverted_gr.get("description") == old_gr.description
        assert reverted_gr.rules[0].data_dict() == old_gr.rules[0].\
            data_dict()
        assert reverted_gr.get("builtin") is old_gr.builtin
        assert reverted_gr.newUserDefault is old_gr.newUserDefault
    request.addfinalizer(revert)