code: def notify(f):
      """Wraps `f` such that callbacks are notified about it being called."""
  
      @functools.wraps(f)
      def wrapper(self, *args, **kwargs):
          TensorVariableCallbacks.instance.notify(self)
          return f(
              self, *args, **kwargs
          )  # pytype: disable=wrong-arg-count
  
      return wrapper
  
imports: import collections
  import functools
  import itertools
  import threading
  import contextlib
  from sonnet.src.functional import utils
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: notify(f) and returns: wrapper, f