code: def testOverrideRegisterExecution(self):
      # Mock all real operations of driver / executor / MLMD accesses.
      mock_targets = (  # (cls, method, return_value)
          (
              beam_executor_operator.BeamExecutorOperator,
              "__init__",
              None,
          ),
          (
              beam_executor_operator.BeamExecutorOperator,
              "run_executor",
              execution_result_pb2.ExecutorOutput(),
          ),
          (
              python_driver_operator.PythonDriverOperator,
              "__init__",
              None,
          ),
          (
              python_driver_operator.PythonDriverOperator,
              "run_driver",
              driver_output_pb2.DriverOutput(),
          ),
          (metadata.Metadata, "__init__", None),
          (metadata.Metadata, "__exit__", None),
          (launcher.Launcher, "_publish_successful_execution", None),
          (
              launcher.Launcher,
              "_clean_up_stateless_execution_info",
              None,
          ),
          (
              launcher.Launcher,
              "_clean_up_stateful_execution_info",
              None,
          ),
          (outputs_utils, "OutputsResolver", mock.MagicMock()),
          (
              execution_lib,
              "get_executions_associated_with_all_contexts",
              [],
          ),
          (container_entrypoint, "_dump_ui_metadata", None),
      )
      for cls, method, return_value in mock_targets:
          self.enter_context(
              mock.patch.object(
                  cls, method, autospec=True, return_value=return_value
              )
          )
  
      mock_mlmd = self.enter_context(
          mock.patch.object(
              metadata.Metadata, "__enter__", autospec=True
          )
      ).return_value
      mock_mlmd.store.return_value.get_executions_by_id.return_value = [
          metadata_store_pb2.Execution()
      ]
  
      self._set_required_env_vars(
          {
              "WORKFLOW_ID": "workflow-id-42",
              "METADATA_GRPC_SERVICE_HOST": "metadata-grpc",
              "METADATA_GRPC_SERVICE_PORT": "8080",
              container_entrypoint._KFP_POD_NAME_ENV_KEY: "test_pod_name",
          }
      )
  
      mock_register_execution = self.enter_context(
          mock.patch.object(
              execution_publish_utils,
              "register_execution",
              autospec=True,
          )
      )
  
      test_ir_file = os.path.join(
          os.path.dirname(os.path.abspath(__file__)),
          "testdata",
          "two_step_pipeline_post_dehydrate_ir.json",
      )
      test_ir = io_utils.read_string_file(test_ir_file)
  
      argv = [
          "--pipeline_root",
          "dummy",
          "--kubeflow_metadata_config",
          json_format.MessageToJson(
              kubeflow_dag_runner.get_default_kubeflow_metadata_config()
          ),
          "--tfx_ir",
          test_ir,
          "--node_id",
          "BigQueryExampleGen",
          "--runtime_parameter",
          "pipeline-run-id=STRING:my-run-id",
      ]
      container_entrypoint.main(argv)
  
      mock_register_execution.assert_called_once()
      kwargs = mock_register_execution.call_args[1]
      self.assertEqual(
          kwargs["exec_properties"][
              container_entrypoint._KFP_POD_NAME_PROPERTY_KEY
          ],
          "test_pod_name",
      )
  
imports: import json
  import os
  from unittest import mock
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.orchestration import metadata
  from tfx.orchestration.kubeflow import container_entrypoint
  from tfx.orchestration.kubeflow import kubeflow_dag_runner
  from tfx.orchestration.kubeflow.proto import kubeflow_pb2
  from tfx.orchestration.portable import beam_executor_operator
  from tfx.orchestration.portable import data_types
  from tfx.orchestration.portable import execution_publish_utils
  from tfx.orchestration.portable import launcher
  from tfx.orchestration.portable import outputs_utils
  from tfx.orchestration.portable import python_driver_operator
  from tfx.orchestration.portable.mlmd import execution_lib
  from tfx.proto.orchestration import driver_output_pb2
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import standard_artifacts
  from tfx.utils import io_utils
  from tfx.utils import test_case_utils
  from google.protobuf import json_format
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 6 for calling the MLMDConfigTest obj's underlying member method code with example usage: obj.testOverrideRegisterExecution() without return types