input: Write a python function to train a SVM classifier on the iris dataset using only the first two features, and predict the class of a given set of test data.
  assert svm_predict([[5.5, 1.8], [7.5, 2.2], [4.9, 1.5], [5.8, 2.4]]) == [0, 1, 0, 2]
  assert svm_predict([[6.0, 2.5], [5.1, 1.4], [7.0, 3.2]]) == [1, 0, 1]
  assert svm_predict([[4.4, 1.3], [5.7, 2.0], [6.3, 2.8]]) == [0, 1, 2]
output: def svm_predict(test_data):
      from sklearn import datasets
      from sklearn.model_selection import train_test_split
      from sklearn.svm import SVC
      import numpy as np
  
      # Load the iris dataset
      iris = datasets.load_iris()
      X = iris.data[:, :2]  # Only take the first two features
      y = iris.target
  
      # Split the data into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)
  
      # Train a SVM classifier
      clf = SVC(kernel='linear')
      clf.fit(X_train, y_train)
  
      # Predict the class of the given test data
      predictions = clf.predict(test_data)
      return predictions.tolist()