def set_item(key,value):
    """Write JSON content from value argument to cached file and return"""
    CACHED_KEY_FILE = os.path.join(CURRENT_DIR, key)

    open(CACHED_KEY_FILE, "wb").write(json.dumps({"_": value}).encode('UTF-8'))

    return value
Write JSON content from value argument to cached file and return