input: Write a python function to classify data based on predictions.
  assert classify([0.3, 0.7, 0.2, 0.8]) == [0, 1, 0, 1]
  assert classify([0.6, 0.4, 0.9, 0.1]) == [1, 0, 1, 0]
  assert classify([0.5, 0.5, 0.5, 0.5]) == [0, 0, 0, 0]
output: def classify(predictions):
      return [1 if pred > 0.5 else 0 for pred in predictions]