code: def testPublishSuccessfulExecutionIngoresReferenceArtifact(self):
      with metadata.Metadata(
          connection_config=self._connection_config
      ) as m:
          contexts = self._generate_contexts(m)
          execution_id = execution_publish_utils.register_execution(
              m, self._execution_type, contexts
          ).id
          output_key = "checkpoint_model"
          artifact = standard_artifacts.Model()
          artifact.uri = "/base_uri"
          artifact.state = tfx_artifact.ArtifactState.REFERENCE
          execution_lib.register_output_artifacts(
              m, execution_id, {output_key: [artifact]}
          )
          executor_output = execution_result_pb2.ExecutorOutput()
          execution_publish_utils.publish_succeeded_execution(
              m,
              execution_id,
              contexts,
              {output_key: [artifact]},
              executor_output,
          )
  
          [execution] = m.store.get_executions()
          self.assertProtoPartiallyEquals(
              """
            id: 1
            last_known_state: COMPLETE
            """,
              execution,
              ignored_fields=[
                  "type_id",
                  "type",
                  "create_time_since_epoch",
                  "last_update_time_since_epoch",
                  "name",
              ],
          )
  
          [
              pre_registration_event
          ] = m.store.get_events_by_execution_ids([execution.id])
          # No OUTPUT Event should exist for the REFERENCE artifact.
          self.assertProtoPartiallyEquals(
              """
            artifact_id: 1
            execution_id: 1
            path {
              steps {
                key: 'checkpoint_model'
              }
              steps {
                index: 0
              }
            }
            type: PENDING_OUTPUT
            """,
              pre_registration_event,
              ignored_fields=["milliseconds_since_epoch"],
          )
  
          # Check that the artifact state is still REFERENCE and not PENDING.
          [artifact] = m.store.get_artifacts()
          self.assertProtoPartiallyEquals(
              f"""
            id: 1
            state: REFERENCE
            uri: '/base_uri'
            custom_properties {{
              key: '{artifact_utils.ARTIFACT_TFX_VERSION_CUSTOM_PROPERTY_KEY}'
              value {{string_value: "{version.__version__}"}}
            }}""",
              artifact,
              ignored_fields=[
                  "type_id",
                  "type",
                  "create_time_since_epoch",
                  "last_update_time_since_epoch",
              ],
          )
  
imports: import copy
  from absl.testing import parameterized
  import tensorflow
  from tfx import version
  from tfx.orchestration import metadata
  from tfx.orchestration.portable import execution_publish_utils
  from tfx.orchestration.portable import outputs_utils
  from tfx.orchestration.portable.mlmd import context_lib
  from tfx.orchestration.portable.mlmd import execution_lib
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import artifact
  from tfx.types import artifact_utils
  from tfx.types import standard_artifacts
  from tfx.utils import test_case_utils
  from google.protobuf import text_format
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 17 for calling the ExecutionPublisherTest obj's underlying member method code with example usage: obj.testPublishSuccessfulExecutionIngoresReferenceArtifact() without return types