<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _install_blender(use_threaded_wrapper):
 """Blender is a special snowflake It doesn't have a mechanism with which to call commands from a thread other than the main thread. So what's happening below is we run a polling command every 10 milliseconds to see whether QML has any tasks for us. If it does, then Blender runs this command (blocking while it does it), and passes the result back to QML when ready. The consequence of this is that we're polling even though nothing is expected to arrive. The cost of polling is expected to be neglible, but it's worth keeping in mind and ideally optimise away. E.g. only poll when the QML window is actually open. """


    import bpy

    qml_to_blender = queue.Queue()
    blender_to_qml = queue.Queue()

    def threaded_wrapper(func, *args, **kwargs):
        qml_to_blender.put((func, args, kwargs))
        return blender_to_qml.get()

    class PyblishQMLOperator(bpy.types.Operator):
        """Operator which runs its self from a timer"""
        bl_idname = "wm.pyblish_qml_timer"
        bl_label = "Pyblish QML Timer Operator"

        _timer = None

        def modal(self, context, event):
            if event.type == 'TIMER':
                try:
                    func, args, kwargs = qml_to_blender.get_nowait()

                except queue.Empty:
                    pass

                else:
                    result = func(*args, **kwargs)
                    blender_to_qml.put(result)

            return {'PASS_THROUGH'}

        def execute(self, context):
            wm = context.window_manager

            # Check the queue ever 10 ms
            # The cost of checking the queue is neglible, but it
            # does mean having Python execute a command all the time,
            # even as the artist is working normally and is nowhere
            # near publishing anything.
            self._timer = wm.event_timer_add(0.01, context.window)

            wm.modal_handler_add(self)
            return {'RUNNING_MODAL'}

        def cancel(self, context):
            wm = context.window_manager
            wm.event_timer_remove(self._timer)

    log.info("Registering Blender + Pyblish operator")
    bpy.utils.register_class(PyblishQMLOperator)

    # Start the timer
    bpy.ops.wm.pyblish_qml_timer()

    # Expose externally, for debugging. It enables you to
    # pause the timer, and add/remove commands by hand.
    _state["QmlToBlenderQueue"] = qml_to_blender
    _state["BlenderToQmlQueue"] = blender_to_qml

    _common_setup("Blender", threaded_wrapper, use_threaded_wrapper)