code: def test_model_compile_keras(self):
      # Specify the training configuration (optimizer, loss, metrics).
      optimizer = tf.keras.optimizers.RMSprop()
      loss = losses.SoftmaxLoss()
      eval_metrics = [metrics.NDCGMetric("ndcg_5", topn=5)]
      ranker = model.create_keras_model(
          network=self.network,
          loss=loss,
          metrics=eval_metrics,
          optimizer=optimizer,
          size_feature_name=None,
      )
  
      self.assertIs(ranker.optimizer, optimizer)
      self.assertIs(ranker.loss, loss)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow.compat.v2
  from tensorflow_ranking.python.keras import losses
  from tensorflow_ranking.python.keras import metrics
  from tensorflow_ranking.python.keras import model
  from tensorflow_ranking.python.keras.canned import dnn
label_desc: Use image node_id 8 for calling the DNNRankingNetworkTest obj's underlying member method code with example usage: obj.test_model_compile_keras() without return types