code: def setUp(self):
      super().setUp()
      self._project_id = "my-project"
      self._job_id = "my-job-123"
      self._labels = ["label1", "label2"]
  
      examples_artifact = standard_artifacts.Examples()
      examples_artifact.split_names = artifact_utils.encode_split_names(
          ["train", "eval"]
      )
      examples_artifact.uri = _EXAMPLE_LOCATION
      self._inputs = {"examples": [examples_artifact]}
      model_artifact = standard_artifacts.Model()
      model_artifact.uri = _MODEL_LOCATION
      self._outputs = {"model": [model_artifact]}
  
      training_job = {
          "training_input": {
              "scaleTier": "CUSTOM",
              "region": "us-central1",
              "masterType": "n1-standard-8",
              "masterConfig": {
                  "imageUri": "gcr.io/my-project/caip-training-test:latest"
              },
              "workerType": "n1-standard-8",
              "workerCount": 8,
              "workerConfig": {
                  "imageUri": "gcr.io/my-project/caip-training-test:latest"
              },
              "args": [
                  "--examples",
                  placeholders.InputUriPlaceholder("examples"),
                  "--n-steps",
                  placeholders.InputValuePlaceholder("n_step"),
                  "--model-dir",
                  placeholders.OutputUriPlaceholder("model"),
              ],
          },
          "labels": self._labels,
      }
  
      aip_training_config = {
          ai_platform_training_executor.PROJECT_CONFIG_KEY: self._project_id,
          ai_platform_training_executor.TRAINING_JOB_CONFIG_KEY: training_job,
          ai_platform_training_executor.JOB_ID_CONFIG_KEY: self._job_id,
          ai_platform_training_executor.LABELS_CONFIG_KEY: self._labels,
      }
  
      self._exec_properties = {
          ai_platform_training_executor.CONFIG_KEY: json_utils.dumps(
              aip_training_config
          ),
          "n_step": 100,
      }
  
      resolved_training_input = copy.deepcopy(
          training_job["training_input"]
      )
      resolved_training_input["args"] = [
          "--examples",
          _EXAMPLE_LOCATION,
          "--n-steps",
          "100",
          "--model-dir",
          _MODEL_LOCATION,
      ]
  
      self._expected_job_spec = {
          "job_id": self._job_id,
          "training_input": resolved_training_input,
          "labels": self._labels,
      }
  
      self._mock_api_client = mock.Mock()
      mock_discovery = self.enter_context(
          mock.patch.object(discovery, "build", autospec=True)
      )
      mock_discovery.return_value = self._mock_api_client
      self._setUpTrainingMocks()
  
file_path: tfx/tfx/orchestration/kubeflow/v2/components/experimental/ai_platform_training_executor_test.py
imports: import copy
  from unittest import mock
  from googleapiclient import discovery
  import tensorflow
  from tfx.dsl.component.experimental import placeholders
  from tfx.orchestration.kubeflow.v2.components.experimental import ai_platform_training_executor
  from tfx.types import artifact_utils
  from tfx.types import standard_artifacts
  from tfx.utils import json_utils
  from tfx.utils import test_case_utils
label_desc: Use image node_id 1 for calling the AiPlatformTrainingExecutorTest obj's underlying member method code with example usage: obj.setUp() without return types