code: def test_state_counter(self):
      with hk.variables():
          v = tf.Variable(0, trainable=False)
  
      f = hk.transform_with_state(lambda: v.assign_add(1))
      params, initial_state = f.init()
      for _ in range(2):
          state = initial_state
          for i in range(10):
              y, state = f.apply(params, state)
              self.assertEqual(y.numpy(), i + 1)
  
imports: from absl.testing import parameterized
  import sonnet
  from sonnet.src import test_utils
  from sonnet.src.functional import haiku
  import tensorflow
  import tree
label_desc: Use image node_id 6 for calling the NetworkTest obj's underlying member method code with example usage: obj.test_state_counter() without return types