code: def test_has_projection(
      self, resnet_class_and_has_projection, resnet_v2
  ):
      resnet_class, has_projection = resnet_class_and_has_projection
      model = resnet_class(1000, resnet_v2=resnet_v2)
      for i, block_group in enumerate(model.block_groups):
          if i == 0:
              self.assertEqual(
                  hasattr(block_group.blocks[0], "proj_conv"),
                  has_projection,
              )
          else:
              self.assertTrue(
                  hasattr(block_group.blocks[0], "proj_conv")
              )
  
          for block in block_group.blocks[1:]:
              self.assertFalse(hasattr(block, "proj_conv"))
  
file_path: dm-haiku/haiku/_src/nets/resnet_test.py
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import haiku
  from haiku._src import test_utils
  from haiku._src import transform
  from haiku._src.nets import resnet
  import jax
  import jax.numpy
  import numpy
label_desc: Use image node_id 6 for calling the ResnetTest obj's underlying member method code with example usage: obj.test_has_projection(resnet_class_and_has_projection, resnet_v2) without return types