code: def testReconstructArtifactMultimap_IndexShouldBeConsecutive(self):
      a1 = Artifact(id=1, name="a1")
      a2 = Artifact(id=2, name="a2")
  
      with self.subTest("Starts from nonzero"):
          with self.assertRaisesRegex(
              ValueError, 'Index values for key "a" are not consecutive'
          ):
              event_lib.reconstruct_artifact_multimap(
                  artifacts=[a1],
                  events=[
                      Event(artifact_id=a1.id, path=valid_path("a", 1)),
                  ],
              )
  
      with self.subTest("Missing the middle"):
          with self.assertRaisesRegex(
              ValueError, 'Index values for key "a" are not consecutive'
          ):
              event_lib.reconstruct_artifact_multimap(
                  artifacts=[a1, a2],
                  events=[
                      Event(artifact_id=a1.id, path=valid_path("a", 0)),
                      Event(artifact_id=a2.id, path=valid_path("a", 2)),
                  ],
              )
  
      with self.subTest("Duplicated index"):
          with self.assertRaisesRegex(
              ValueError, 'Index values for key "a" are not consecutive'
          ):
              event_lib.reconstruct_artifact_multimap(
                  artifacts=[a1, a2],
                  events=[
                      Event(artifact_id=a1.id, path=valid_path("a", 0)),
                      Event(artifact_id=a2.id, path=valid_path("a", 0)),
                  ],
              )
  
imports: import itertools
  from absl.testing import parameterized
  import tensorflow
  from tfx.orchestration.portable.mlmd import event_lib
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 7 for calling the EventLibTest obj's underlying member method code with example usage: obj.testReconstructArtifactMultimap_IndexShouldBeConsecutive() without return types