code: def normalize(x, min_value, max_value):
      
      x = (x - min_value) / (max_value - min_value)
      return clip(x, 0, 1)
docs: Normalize value between min and max values.
      It also clips the values, so that you cannot have values higher or lower
      than 0 - 1.