def from_mongo(data):
    if not data:
        return None

    data['id'] = str(data['_id'])
    return data
# [END from_mongo]
Translates the MongoDB dictionary format into the format that's expected
dataset/ETHPy150Open GoogleCloudPlatform/getting-started-python/2-structured-data/bookshelf/model_mongodb.py/from_mongo