code: def make_transform_fn():
      """Returns a transform_fn that converts features to dense Tensors."""
  
      def _transform_fn(features, mode):
          """Defines transform_fn."""
          if mode == tf_estimator.ModeKeys.PREDICT:
              # We expect tf.Example as input during serving. In this case, group_size
              # must be set to 1.
              if FLAGS.group_size != 1:
                  raise ValueError(
                      "group_size should be 1 to be able to export model, but get %s"
                      % FLAGS.group_size
                  )
              (
                  context_features,
                  example_features,
              ) = tfr.feature.encode_pointwise_features(
                  features=features,
                  context_feature_columns=None,
                  example_feature_columns=example_feature_columns(),
                  mode=mode,
                  scope="transform_layer",
              )
          else:
              (
                  context_features,
                  example_features,
              ) = tfr.feature.encode_listwise_features(
                  features=features,
                  context_feature_columns=None,
                  example_feature_columns=example_feature_columns(),
                  mode=mode,
                  scope="transform_layer",
              )
  
          return context_features, example_features
  
      return _transform_fn
  
imports: from absl import flags
  import numpy
  import six
  import tensorflow
  from tensorflow import estimator
  import tensorflow_ranking
label_desc: Use image node_id 7 for calling a global function with example usage: make_transform_fn() and returns: _transform_fn, context_features,  example_features