code: def _group_score_fn(
      context_features, group_features, mode, params, config
  ):
      """Scoring function of the groupwise ranking model_fn under test."""
      del [mode, params, config]
      batch_size = tf.shape(input=context_features["context"])[0]
      input_layer = tf.concat(
          [
              tf.reshape(context_features["context"], [batch_size, -1]),
              tf.reshape(group_features["age"], [batch_size, -1]),
          ],
          axis=1,
      )
      # Shape is [batch_size, 2].
      # TODO: Convert to tf.keras.layers.Dense, and change *_NAME.
      group_score = tf.compat.v1.layers.dense(input_layer, units=2)
      return group_score
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl.testing import parameterized
  import tensorflow
  from tensorflow import estimator
  from tensorflow_ranking.python import feature
  from tensorflow_ranking.python import head
  from tensorflow_ranking.python import losses
  from tensorflow_ranking.python import model
label_desc: Use image node_id 2 for calling a global function with example usage: _group_score_fn(context_features, group_features, mode, params, config) and returns: group_score