def METHOD_NAME(data):
    # For JSON Patch empty entries are valid
    # With redis, when last key is removed, the table gets removed too.
    #
    # Hence where required, prune tables with no keys.
    #
    tables = list(data.keys())
    for tbl in tables:
        if not data[tbl]:
            data.pop(tbl)
    return data