input: Write a python function to train a SVM classifier on a given dataset and return the accuracy.
  assert train_svm_and_evaluate('data.csv') > 0.5
  assert isinstance(train_svm_and_evaluate('data.csv'), float)
output: def train_svm_and_evaluate(data_path):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.svm import SVC
      from sklearn.metrics import accuracy_score
      
      # Load the dataset
      data = pd.read_csv(data_path)
      
      # Assuming the last column is the target variable
      X = data.iloc[:, :-1]
      y = data.iloc[:, -1]
      
      # Split the dataset into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
      
      # Initialize the SVM classifier
      svm_classifier = SVC()
      
      # Train the classifier
      svm_classifier.fit(X_train, y_train)
      
      # Make predictions
      y_pred = svm_classifier.predict(X_test)
      
      # Calculate accuracy
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy