code: def update(self, x):
      if self._built:
          self._foo.assign(x)
      else:
          self._foo = tf.Variable(x)
          self._built = True
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  from sonnet.src import batch_norm
  from sonnet.src import initializers
  from sonnet.src import test_utils
  import tensorflow
label_desc: Use image node_id 2 for calling the TestMetric obj's underlying member method code with example usage: obj.update(x) without return types