def to_mongo(self, value, **kwargs):
        return self.to_python(value)
Convert a Python type to a MongoDB-compatible type.
dataset/ETHPy150Open MongoEngine/mongoengine/mongoengine/base/fields.py/BaseField.to_mongo