code: def test_transform_fn_predict_pointwise_inference(self, loss_key):
      estimator_with_default_transform_fn = (
          self._create_default_estimator(loss_key)
      )
  
      # The below tests `transform_fn` in PREDICT mode with pointwise inference.
      # In this mode, `_transform_fn` invokes the `encode_pointwise_features()`,
      # which requires 2D example features and 2D context features.
      (
          context,
          example,
      ) = estimator_with_default_transform_fn._transform_fn(
          {
              "f1": tf.ones([10, 1], dtype=tf.float32),
              "f2": tf.ones([10, 1], dtype=tf.float32) * 2.0,
              "f3": tf.ones([10, 1], dtype=tf.float32) * 3.0,
              "c1": tf.ones([10, 1], dtype=tf.float32),
              "c2": tf.ones([10, 1], dtype=tf.float32) * 2.0,
          },
          tf_estimator.ModeKeys.PREDICT,
      )
  
      # After transformation, we get 2D context tensor and 3D example tensor.
      self.assertAllEqual(tf.ones(shape=[10, 1]), context["c1"])
      self.assertAllEqual(tf.ones(shape=[10, 1, 1]), example["f1"])
  
imports: import os
  from absl.testing import parameterized
  import six
  import tensorflow
  from tensorflow import estimator
  from google.protobuf import text_format
  from tensorflow_ranking.python import data
  from tensorflow_ranking.python import estimator
  from tensorflow_ranking.python import feature
  from tensorflow_serving.apis import input_pb2
label_desc: Use image node_id 5 for calling the EstimatorBuilderTest obj's underlying member method code with example usage: obj.test_transform_fn_predict_pointwise_inference(loss_key) without return types