Returns the closest possible value for the given key.
the closest value to the input key
the input key