input: Write a function to predict whether a given set of features corresponds to an apple or a banana using a trained machine learning model (Support Vector Classifier with a linear kernel). The model should be trained on the provided data. If the function correctly identifies the classes, it should return an array with predictions for the given test data. If the function performs as expected, it should return the exact same array as the provided example.
  
  assert predict_fruit(X, y, kernel='linear', test_data=[[2,2,2], [4,4,4]])==[0, 1]
output: def predict_fruit(X, y, kernel='linear', test_data=None):
      from sklearn.svm import SVC
      model = SVC(kernel=kernel)
      model.fit(X, y)
      return model.predict(test_data)