docstr: Test the entrypoint with Driver's output metadata.
docstr_tok: ["Test","the","entrypoint","with","Driver","'s","output","metadata","."]
code: def testEntryPointWithDriver(self):
      """Test the entrypoint with Driver's output metadata."""
      # Mock the driver's output metadata.
      output_metadata = pipeline_spec_pb2.ExecutorOutput()
      output_metadata.parameters["key_1"].string_value = "driver"
      output_metadata.parameters["key_3"].string_value = "driver3"
      fileio.makedirs(os.path.dirname(_TEST_OUTPUT_METADATA_JSON))
      with fileio.open(_TEST_OUTPUT_METADATA_JSON, "wb") as f:
          f.write(
              json_format.MessageToJson(output_metadata, sort_keys=True)
          )
  
      with _ArgsCapture() as args_capture:
          args = [
              "--executor_class_path",
              name_utils.get_full_name(_FakeExecutor),
              "--json_serialized_invocation_args",
              self._serialized_metadata,
          ]
          kubeflow_v2_run_executor.main(
              kubeflow_v2_run_executor._parse_flags(args)
          )
          # TODO(b/131417512): Add equal comparison to types.Artifact class so we
          # can use asserters.
          self.assertEqual(
              set(args_capture.input_dict.keys()),
              set(["input_1", "input_2"]),
          )
          self.assertEqual(
              set(args_capture.output_dict.keys()),
              set(["output", standard_component_specs.BLESSING_KEY]),
          )
          # Verify that exec_properties use driver's output metadata.
          self.assertEqual(
              args_capture.exec_properties,
              {
                  "key_1": "driver",  # Overwrite.
                  "key_2": 536870911,
                  "key_3": "driver3",  # Append.
              },
          )
  
      # Test what's been output.
      with open(_TEST_OUTPUT_METADATA_JSON) as output_meta_json:
          actual_output = json.dumps(
              json.load(output_meta_json), indent=2, sort_keys=True
          )
  
      self.assertEqual(actual_output, self._expected_output)
      os.remove(_TEST_OUTPUT_METADATA_JSON)
  
imports: import json
  import os
  from typing import Any, Mapping, Sequence
  from unittest import mock
  from kfp.pipeline_spec import pipeline_spec_pb2
  import tensorflow
  from tfx import version
  from tfx.components.evaluator import constants
  from tfx.components.evaluator import executor
  from tfx.dsl.io import fileio
  from tfx.orchestration.kubeflow.v2.container import kubeflow_v2_run_executor
  from tfx.types import artifact
  from tfx.types import artifact_utils
  from tfx.types import standard_artifacts
  from tfx.types import standard_component_specs
  from tfx.utils import io_utils
  from tfx.utils import name_utils
  from tfx.utils import test_case_utils
  from google.protobuf import struct_pb2
  from google.protobuf import json_format
label_desc: Use image node_id 5 for calling the KubeflowV2RunExecutorTest obj's underlying member method code with example usage: obj.testEntryPointWithDriver() without return types