code: def setUp(self):
      super().setUp()
  
      # Set a constant version for artifact version tag.
      patcher = mock.patch("tfx.version.__version__")
      patcher.start()
      version.__version__ = "0.123.4.dev"
      self.addCleanup(patcher.stop)
  
      # Prepare executor input.
      serialized_metadata = self._get_text_from_test_data(
          "executor_invocation.json"
      )
      metadata_json = json.loads(serialized_metadata)
      # Mutate the outputFile field.
      metadata_json["outputs"][
          "outputFile"
      ] = _TEST_OUTPUT_METADATA_JSON
      self._serialized_metadata = json.dumps(metadata_json)
  
      # Prepare executor input using output parameters
      serialized_metadata_dynamic_execution = (
          self._get_text_from_test_data(
              "executor_invocation_with_output_parameters.json"
          )
      )
      self._metadata_json_dynamic_execution = json.loads(
          serialized_metadata_dynamic_execution
      )
      # Mutate the outputFile field.
      self._metadata_json_dynamic_execution["outputs"][
          "outputFile"
      ] = _TEST_OUTPUT_METADATA_JSON
  
      # Prepare executor input using legacy properties and custom properties.
      serialized_metadata_legacy = self._get_text_from_test_data(
          "executor_invocation_legacy.json"
      )
      metadata_json_legacy = json.loads(serialized_metadata_legacy)
      # Mutate the outputFile field.
      metadata_json_legacy["outputs"][
          "outputFile"
      ] = _TEST_OUTPUT_METADATA_JSON
      self._serialized_metadata_legacy = json.dumps(
          metadata_json_legacy
      )
  
      self._expected_output = self._get_text_from_test_data(
          "expected_output_metadata.json"
      ).strip()
  
      # Change working directory after the testdata files have been read.
      self.enter_context(
          test_case_utils.change_working_dir(self.tmp_dir)
      )
  
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 1 for calling the KubeflowV2RunExecutorTest obj's underlying member method code with example usage: obj.setUp() without return types