code: def test_requires_tf2(self):
      if tf.version.GIT_VERSION != "unknown":
          self.skipTest(
              "This test only runs if testing against TF at head."
          )
  
      with self.assertRaisesRegex(
          AssertionError, "requires TensorFlow 2"
      ):
          snt.Module()
  
imports: import sonnet
  from sonnet.src import test_utils
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the TensorFlow1Test obj's underlying member method code with example usage: obj.test_requires_tf2() without return types