def catch_nb_assignment(func):
@wraps(func)<EOL>def wrapper(self, *args, **kwargs):<EOL><INDENT>nb = kwargs.get('<STR_LIT>')<EOL>if nb:<EOL><INDENT>self.nb = nb<EOL><DEDENT>return func(self, *args, **kwargs)<EOL><DEDENT>return wrapper<EOL>
Wrapper to catch `nb` keyword arguments

This helps catch `nb` keyword arguments and assign onto self when passed to
the wrapped function.

Used for callback methods when the caller may optionally have a new copy
of the originally wrapped `nb` object.