def METHOD_NAME(recording, method, method_kwargs):
    """Initialize worker for finding spikes."""
    from .method_list import matching_methods
    method_class = matching_methods[method]
    method_kwargs = method_class.unserialize_in_worker(method_kwargs)
    # create a local dict per worker
    worker_ctx = {}
    worker_ctx["recording"] = recording
    worker_ctx["method"] = method
    worker_ctx["method_kwargs"] = method_kwargs
    worker_ctx["function"] = method_class.main_function
    return worker_ctx