input: Write a function to optimize a given classifier using GridSearchCV with accuracy as the scoring metric.
  assert optimize_model(classifier, parameters)[0] == {'param1': 'value1', 'param2': 'value2'}
  assert isinstance(optimize_model(classifier, parameters)[1], GridSearchCV)
output: def optimize_model(classifier, parameters):
      from sklearn.model_selection import GridSearchCV
  
      grid_search = GridSearchCV(estimator=classifier, param_grid=parameters, scoring='accuracy')
      grid_search.fit(X_train, y_train)
  
      return grid_search.best_params_, grid_search