def handle_cancel(self, **kwargs):
for func in self._cancel_functions:<EOL><INDENT>f_args = getargspec(func)[<NUM_LIT:0>]<EOL>f_kwargs = {key: kwargs[key] for key in f_args if key in kwargs}<EOL>func(**f_kwargs)<EOL><DEDENT>
Cancelling a run.