@classmethod
    @gen.engine
    def insert_async(klass, to_insert, *args, **kwargs):
        from Mojo.ServerHelpers.RunServer import BACKEND_COLLECTION, DATABASE

        cb = kwargs['callback']
        del(kwargs['callback'])

        if DATABASE:
            if BACKEND_COLLECTION:
                this_collection = BACKEND_COLLECTION(DATABASE, klass)
                ret_obj = yield gen.Task(this_collection.insert,to_insert, *args, **kwargs)

                cb(ret_obj)
Returns a sized toplevel QDockWidget for a LayoutItem.
dataset/ETHPy150Open lonelycode/Mojo/Mojo/ObjectMapper/ModelPrototype.py/Model.insert_async--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/ui/qt4/tasks/main_window_layout.py/MainWindowLayout._prepare_toplevel_for_item