code: def test_pipeline_with_best_exporter(self, loss_key):
      model_dir = self._model_dir + "pipeline-exporter/"
      hparams = _make_hparams(
          train_input_pattern=self._data_file,
          eval_input_pattern=self._data_file,
          model_dir=model_dir,
          list_size=5,
          num_train_steps=3,
          num_eval_steps=3,
          checkpoint_secs=1,
          num_checkpoints=2,
          loss_key=loss_key,
      )
      hparams["assets_extra"] = {"text_asset": self._asset_file}
  
      pip = RankingPipelineClient().build_best_exporter_pipeline(
          hparams
      )
      pip.train_and_eval(local_training=True)
      self.assertTrue(
          tf.io.gfile.exists(model_dir + "export/latest_model")
      )
      self.assertTrue(
          tf.io.gfile.exists(model_dir + "export/best_model_by_metric")
      )
      for export_strategy in [
          "export/latest_model",
          "export/best_model_by_metric",
      ]:
          base_dir = model_dir + export_strategy
          saved_models = tf.io.gfile.listdir(base_dir)
          self.assertNotEmpty(saved_models)
          for saved_model_dir in saved_models:
              asset_dir = base_dir + f"/{saved_model_dir}/assets.extra"
              self.assertTrue(tf.io.gfile.exists(asset_dir))
              self.assertTrue(
                  tf.io.gfile.exists(asset_dir + "/text_asset")
              )
              self.assertEqual(
                  self._asset_content,
                  tf.io.gfile.GFile(asset_dir + "/text_asset").read(),
              )
  
imports: import os
  from absl.testing import parameterized
  import tensorflow
  from tensorflow import estimator
  import tensorflow_ranking
  from google.protobuf import text_format
  from tensorflow_ranking.extension import pipeline
  from tensorflow_serving.apis import input_pb2
label_desc: Use image node_id 4 for calling the RankingPipelineIntegrationTest obj's underlying member method code with example usage: obj.test_pipeline_with_best_exporter(loss_key) without return types