input: Write a function to evaluate the accuracy of a machine-learning model. The function should take as input the trained classifier, the feature matrix for training and testing (X_train and X_test), and the corresponding target vectors (y_train and y_test). The function should return the accuracy of the model. If the input classifier is not trained, the function should raise an error.
  from sklearn.metrics import accuracy_score
  
  def evaluate_model_accuracy(clf, X_train, X_test, y_train, y_test):
      clf.fit(X_train, y_train)
      y_pred = clf.predict(X_test)
      return accuracy_score(y_test, y_pred)
  
  assert evaluate_model_accuracy(SVC(kernel='poly', degree=2, gamma=0.05), X_train, X_test, y_train, y_test) == 0.85
  assert evaluate_model_accuracy(SVC(kernel='linear'), X_train, X_test, y_train, y_test) == 0.77
  assert evaluate_model_accuracy(SVC(kernel='rbf'), X_train, X_test, y_train, y_test) == 0.89
  assert evaluate_model_accuracy(SVC(kernel='sigmoid'), X_train, X_test, y_train, y_test) == 0.72
  assert evaluate_model_accuracy(SVC(kernel='precomputed'), X_train, X_test, y_train, y_test) == 0.67
output: 
  def evaluate_model_accuracy(clf, X_train, X_test, y_train, y_test):
      clf.fit(X_train, y_train)
      y_pred = clf.predict(X_test)
      return accuracy_score(y_test, y_pred)
  