class my_decorator(object):

    def __init__(self, target):
        self.target = target
try:
    functools.update_wrapper(self, target)
except:
    pass

def __call__(self, candidates, args):
    pass
Python decorator with multiprocessing fails