def __call__(self, key, input_data, decision, *extra_args):
        """Execute the wrapped func registered with key passing the input_data.

        Any exra_args are also passed along to the wrapped_key.

        The actual actions are dispatched to the decision object and can be one
        of:
            * flush() - nothing to do, any pending actions should be commited
            * fail(e) - ignore pending actions, fail the execution
            * finish(e) - ignore pending actions, complete the execution
            * restart(serialized_input) - ignore pending actions, restart the execution
        """
        try:
            wrapped_func = self.registry[key]
        except __HOLE__:
            logger.error("Colud not find implementation for key: %r", (key,))
            return  # Let it timeout
        try:
            serialized_result = wrapped_func(input_data, *extra_args)
        except SuspendTask:  # only from workflows
            decision.flush()
        except TaskError as e:  # only from workflows
            logger.exception('Unhandled task error in task:')
            decision.fail(e)
        except Restart as e:  # only from workflows
            decision.restart(e.input_data)
        except Exception as e:
            logger.exception('Unhandled exception in task:')
            decision.fail(e)
        else:
            decision.finish(serialized_result)
dataset/ETHPy150Open severb/flowy/flowy/worker.py/Worker.__call__