input: Write a function to evaluate the accuracy of a machine-learning model. The function should fit the model on the training data, predict the labels on the test data, and calculate the accuracy using the `accuracy_score` function from `sklearn.metrics`. If the training data or test data is empty, the function should return 0.
  
  
  assert evaluate_model_accuracy(SVC(kernel='poly', degree=2, gamma=0.05), X_train, y_train, X_test, y_test) == 0.85
  assert evaluate_model_accuracy(SVC(kernel='poly', degree=3, gamma=0.1), X_train, y_train, X_test, y_test) == 0.87
  assert evaluate_model_accuracy(SVC(kernel='rbf', gamma=0.05), X_train, y_train, X_test, y_test) == 0.86
  assert evaluate_model_accuracy(SVC(kernel='linear'), [], y_train, X_test, y_test) == 0
  assert evaluate_model_accuracy(SVC(kernel='poly', degree=2, gamma=0.05), X_train, y_train, [], y_test) == 0
  
output: def evaluate_model_accuracy(model, X_train, y_train, X_test, y_test):
      if len(X_train) == 0 or len(X_test) == 0:
          return 0
      model.fit(X_train, y_train)
      y_pred = model.predict(X_test)
      return accuracy_score(y_test, y_pred)