Form a callback function by wrapping, in the same way as the underlying Dash application would

def callback(self, output, inputs=None, state=None, events=None):
        'Form a callback function by wrapping, in the same way as the underlying Dash application would'
        callback_set = {'output':output,
                        'inputs':inputs and inputs or dict(),
                        'state':state and state or dict(),
                        'events':events and events or dict()}
        def wrap_func(func, callback_set=callback_set, callback_sets=self._callback_sets): # pylint: disable=dangerous-default-value, missing-docstring
            callback_sets.append((callback_set, func))
            return func
        return wrap_func