code: def make_groupwise_ranking_fn(
      group_score_fn, group_size, ranking_head, transform_fn=None
  ):
      """Builds an `Estimator` model_fn for groupwise comparison ranking models.
  
      Args:
        group_score_fn: See `_GroupwiseRankingModel`.
        group_size: See `_GroupwiseRankingModel`.
        ranking_head: A `head._RankingHead` object.
        transform_fn: See `_GroupwiseRankingModel`.
  
      Returns:
        See `_make_model_fn`.
      """
  
      tf.compat.v1.logging.info("Building groupwise ranking model.")
      ranking_model = _GroupwiseRankingModel(
          group_score_fn, group_size, transform_fn
      )
      return _make_model_fn(ranking_model, ranking_head)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
  import tensorflow
  from tensorflow import estimator
  from tensorflow.python.util import function_utils
  from tensorflow_ranking.python import feature
  from tensorflow_ranking.python import utils
label_desc: Use image node_id 6 for calling a global function with example usage: make_groupwise_ranking_fn(group_score_fn, group_size, ranking_head, transform_fn) and returns: _make_model_fn