human
Complete this python program:
def _threaded_method(method_name, sync_name, reactor_name, threadpool_name):
assistant
#Here is the Python program you requested.

    """Create a method that calls another method in a threadpool.
    :param str method_name: The name of the method to look up on the "sync"
    object.
    :param str sync_name: The name of the attribute of ``self`` on which to
    look up the other method to run.  This is the "sync" object.
    :param str reactor_name: The name of the attribute of ``self`` referencing
    the reactor to use to get results back to the calling thread.
    :param str threadpool_name: The name of the attribute of ``self``
    referencing a ``twisted.python.threadpool.ThreadPool`` instance to use
    to run the method in a different thread.
    :return: The new thread-using method.  It has the same signature as the
    original method except it returns a ``Deferred`` that fires with
    the original method\s result.
    """
    def _run_in_thread(self, *args, **kwargs):
        reactor = getattr(self, reactor_name)
        sync = getattr(self, sync_name)
        threadpool = getattr(self, threadpool_name)
        original = getattr(sync, method_name)
        return deferToThreadPool(reactor, threadpool, preserve_context(original), *args, **kwargs)
    return _run_in_thread