<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_model(schema, collection, class_name=None):
 """ Main entry point to creating a new mongothon model. Both schema and Pymongo collection objects must be provided. Returns a new class which can be used as a model class. The class name of the model class by default is inferred from the provided collection (converted to camel case). Optionally, a class_name argument can be provided to override this. """

    if not class_name:
        class_name = camelize(str(collection.name))

    model_class = type(class_name,
                       (Model,),
                       dict(schema=schema, _collection_factory=staticmethod(lambda: collection)))

    # Since we are dynamically creating this class here, we modify __module__ on the
    # created class to point back to the module from which `create_model` was called
    model_class.__module__ = _module_name_from_previous_frame(1)

    return model_class