example of to_mongo with pymongo