docstr: Make sure the number of trainer executions and output models.
docstr_tok: ["Make","sure","the","number","of","trainer","executions","and","output","models","."]
code: def _assertNumberOfTrainerOutputIsOne(self, pipeline_name):
      """Make sure the number of trainer executions and output models."""
      # There must be only one execution of Trainer.
      trainer_output_base_dir = os.path.join(
          self._pipeline_root(pipeline_name), "Trainer", "model"
      )
      trainer_outputs = fileio.listdir(trainer_output_base_dir)
      self.assertEqual(1, len(trainer_outputs))
  
      # There must be only one saved models each for serving and eval.
      model_uri = os.path.join(
          trainer_output_base_dir, trainer_outputs[0]
      )
      eval_model_dir = path_utils.eval_model_dir(model_uri)
      serving_model_dir = path_utils.serving_model_dir(model_uri)
      self.assertEqual(
          1, fileio.listdir(eval_model_dir).count("saved_model.pb")
      )
      self.assertEqual(
          1, fileio.listdir(serving_model_dir).count("saved_model.pb")
      )
  
imports: import os
  import absl
  from googleapiclient import discovery
  from googleapiclient import errors
  import tensorflow
  from tfx import v1
  from tfx.components.pusher.component import Pusher
  from tfx.components.trainer.component import Trainer
  from tfx.dsl.components.base import executor_spec
  from tfx.dsl.components.common import importer
  from tfx.dsl.io import fileio
  from tfx.extensions.google_cloud_ai_platform import constants
  from tfx.extensions.google_cloud_ai_platform import runner
  from tfx.extensions.google_cloud_ai_platform.pusher import executor
  from tfx.extensions.google_cloud_ai_platform.trainer import executor
  from tfx.extensions.google_cloud_ai_platform.tuner import component
  from tfx.extensions.google_cloud_ai_platform.tuner import executor
  from tfx.extensions.google_cloud_big_query.pusher import executor
  from tfx.orchestration import test_utils
  from tfx.orchestration.kubeflow import test_utils
  from tfx.proto import trainer_pb2
  from tfx.proto import tuner_pb2
  from tfx.types import standard_artifacts
  from tfx.utils import path_utils
  from tfx.utils import telemetry_utils
label_desc: Use image node_id 5 for calling the KubeflowGCPIntegrationTest obj's underlying member method code with example usage: obj._assertNumberOfTrainerOutputIsOne(pipeline_name) without return types