import tensorflow as tf

            ):
                values = [values]
            if spec.is_int_feature:
                feature = tf.train.Feature(int64_list=tf.train.Int64List(value=list(values)))
            else:
                feature = tf.train.Feature(float_list=tf.train.FloatList(value=list(values)))
            features[spec.name] = feature
        return tf.train.Example(features=tf.train.Features(feature=features))

    def _input_fn_builder(self, input_file, is_training):
        """Creates an `input_fn` closure to be passed to TPUEstimator."""

        def input_fn(params):
            """The actual input function."""
