import threading


def run_in_thread(func):
    """Run function in thread."""

    def run(*k, **kw):
        mythread = threading.Thread(target=func, args=k, kwargs=kw)
        mythread.start()
        return mythread

    return run