code: def test_only_computes_target_once(self):
      target = ExampleModule()
      targets = [target]
      mod = deferred.Deferred(targets.pop)
      for _ in range(10):
          # If target was recomputed more than once pop should fail.
          self.assertIs(mod.target, target)
          self.assertEmpty(targets)
  
imports: from sonnet.src import base
  from sonnet.src import deferred
  from sonnet.src import test_utils
  import tensorflow
label_desc: Use image node_id 2 for calling the DeferredTest obj's underlying member method code with example usage: obj.test_only_computes_target_once() without return types