docstr: Return an input function, serves weights defined in weights_feature_name.
  
  Args:
    weights_feature_name: (str) A string defines the weights feature in
      dataset. None if no weights is used.
  
  Returns:
    A function serves features and labels. Weights will be served in features.
docstr_tok: ["Return","an","input","function",",","serves","weights","defined","in","weights_feature_name",".","Args",":","weights_feature_name",":","(","str",")","A","string","defines","the","weights","feature","in","dataset",".","None","if","no","weights","is","used",".","Returns",":","A","function","serves","features","and","labels",".","Weights","will","be","served","in","features","."]
code: def _make_input_fn(self, weights_feature_name=None):
      """Return an input function, serves weights defined in weights_feature_name.
  
      Args:
        weights_feature_name: (str) A string defines the weights feature in
          dataset. None if no weights is used.
  
      Returns:
        A function serves features and labels. Weights will be served in features.
      """
  
      def _input_fn():
          (
              context_feature_columns,
              example_feature_columns,
              _,
          ) = _get_feature_columns()
          context_feature_spec = (
              tf.feature_column.make_parse_example_spec(
                  list(context_feature_columns.values())
              )
          )
  
          label_column = tf.feature_column.numeric_column(
              _LABEL_FEATURE,
              dtype=tf.float32,
              default_value=_PADDING_LABEL,
          )
          weight_column = (
              _get_example_weight_feature_column()
              if weights_feature_name == _EXAMPLE_WEIGHT_FEATURE
              else None
          )
          example_fc_list = (
              list(example_feature_columns.values())
              + [label_column]
              + ([weight_column] if weight_column else [])
          )
          example_feature_spec = (
              tf.feature_column.make_parse_example_spec(example_fc_list)
          )
  
          dataset = data.build_ranking_dataset(
              file_pattern=self._data_file,
              data_format=data.ELWC,
              batch_size=10,
              context_feature_spec=context_feature_spec,
              example_feature_spec=example_feature_spec,
              list_size=2,
              reader=tf.data.TFRecordDataset,
              size_feature_name=_SIZE,
          )
          features = tf.compat.v1.data.make_one_shot_iterator(
              dataset
          ).get_next()
          label = tf.squeeze(features.pop(_LABEL_FEATURE), axis=2)
          return features, label
  
      return _input_fn
  
imports: import os
  from absl.testing import parameterized
  import tensorflow
  from tensorflow import estimator
  from tensorflow.compat.v1 import estimator
  from google.protobuf import text_format
  from tensorflow_ranking.python import data
  from tensorflow_ranking.python.keras import estimator
  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 import network
  from tensorflow_serving.apis import input_pb2
label_desc: Use image node_id 3 for calling the KerasModelToEstimatorTest obj's underlying member method code with example usage: obj._make_input_fn(weights_feature_name) and returns: _input_fn, features,  label