input: Write a function to apply a linear transform to a list of numbers so that the smallest number becomes 0 and the largest becomes 1.
  assert rescale_to_unit([2.0, 49.9]) == [0.0, 1.0]
  assert rescale_to_unit([100.0, 49.9]) == [1.0, 0.0]
  assert rescale_to_unit([1.0, 2.0, 3.0, 4.0, 5.0]) == [0.0, 0.25, 0.5, 0.75, 1.0]
  assert rescale_to_unit([2.0, 1.0, 5.0, 3.0, 4.0]) == [0.25, 0.0, 1.0, 0.5, 0.75]
  assert rescale_to_unit([12.0, 11.0, 15.0, 13.0, 14.0]) == [0.25, 0.0, 1.0, 0.5, 0.75]
  
output: def rescale_to_unit(numbers):
      min_val = min(numbers)
      max_val = max(numbers)
      if min_val == max_val:
          return [0.0] * len(numbers)
      return [(x - min_val) / (max_val - min_val) for x in numbers]