input: Write a function to evaluate the accuracy of a machine-learning model and return the accuracy as a float value. The function should take the model, training data (X_train, y_train), and test data (X_test, y_test) as inputs. If the model is not trained, it should raise a ValueError indicating that the model needs to be fitted before evaluation.
  assert evaluate_model_accuracy(clf, X_train, y_train, X_test, y_test) == 0.95
  assert evaluate_model_accuracy(clf, X_train, y_train, X_test, []) == ValueError("Model needs to be fitted before evaluation")
  assert evaluate_model_accuracy(clf, [], y_train, X_test, y_test) == ValueError("Model needs to be fitted before evaluation")
  assert evaluate_model_accuracy(clf, X_train, y_train, [], y_test) == ValueError("Model needs to be fitted before evaluation")
  assert evaluate_model_accuracy(clf, [], [], [], []) == ValueError("Model needs to be fitted before evaluation")
output: def evaluate_model_accuracy(model, X_train, y_train, X_test, y_test):
      if not hasattr(model, 'coef_') or model.coef_ is None:
          raise ValueError("Model needs to be fitted before evaluation")
      if not X_train or not y_train or not X_test or not y_test:
          raise ValueError("Model needs to be fitted before evaluation")
      model.fit(X_train, y_train)
      y_pred = model.predict(X_test)
      return accuracy_score(y_test, y_pred)