code: def test_create_pipeline_with_misspecified_args(self, loss_key):
      hparams = _make_hparams(
          train_input_pattern=self._data_file,
          eval_input_pattern=self._data_file,
          model_dir=self._model_dir,
          loss_key=loss_key,
      )
  
      # The `estimator` cannot be None.
      with self.assertRaises(ValueError):
          _ = pipeline.RankingPipeline(
              _context_feature_columns(),
              _example_feature_columns(),
              hparams=hparams,
              estimator=None,
              label_feature_name="utility",
              label_feature_type=tf.float32,
          )
  
      # A dict is not an `Estimator`.
      estimator = {}
      with self.assertRaises(ValueError):
          _ = pipeline.RankingPipeline(
              _context_feature_columns(),
              _example_feature_columns(),
              hparams=hparams,
              estimator=estimator,
              label_feature_name="utility",
              label_feature_type=tf.float32,
          )
  
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 7 for calling the RankingPipelineTest obj's underlying member method code with example usage: obj.test_create_pipeline_with_misspecified_args(loss_key) without return types