def METHOD_NAME(function, on_success=None, on_failure=None, start=True):
    worker = Worker(function)
    if on_success:
        worker.finished.connect(on_success)
    if on_failure:
        worker.failed.connect(on_failure)
    if start:
        worker.run()
    return worker