I think this could be it's own top level function, and should also check whether the passed function is actually used in the wrapper.
I think this could be it's own top level function,
and should also check whether the passed function is actually used in the wrapper.