def METHOD_NAME(entries):
    return {"entries": [{"leaf_input": entry.leaf_input.encode("base64"),
                         "extra_data": entry.extra_data.encode("base64")}
                        for entry in entries]}