code: def _scale(x, min_x_value, max_x_value, output_min, output_max):
    
  
    if round(min_x_value - max_x_value, 7) == 0:
      # There is something wrong with the data.
      # Why round to 7 places? It's the same as unittest's assertAlmostEqual.
      raise ValueError('In make_scale_tito, min_x_value == max_x_value')
  
    def _scale(x):
      min_x_valuef = tf.to_float(min_x_value)
      max_x_valuef = tf.to_float(max_x_value)
      output_minf = tf.to_float(output_min)
      output_maxf = tf.to_float(output_max)
      return ((((tf.to_float(x) - min_x_valuef) * (output_maxf - output_minf)) /
              (max_x_valuef - min_x_valuef)) + output_minf)
  
    return _scale(x)
docs: Scale a column to [output_min, output_max].
  
    Assumes the columns's range is [min_x_value, max_x_value]. If this is not
    true at training or prediction time, the output value of this scale could be
    outside the range [output_min, output_max].
  
    Raises:
      ValueError: if min_x_value = max_x_value, as the column is constant.