class_docstr: Holds callbacks that are notified when TensorVariable are used.
class_docstr_tok: ["Holds","callbacks","that","are","notified","when","TensorVariable","are","used","."]
code: def __call__(self, callback):
      self._callbacks.append(callback)
      recording = self._recording
      try:
          self._recording = True
          yield
      finally:
          assert self._callbacks.pop() is callback
          self._recording = recording
  
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 3 for calling the TensorVariableCallbacks obj's underlying member method code with example usage: obj.__call__(callback) without return types