<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def visualize_model(X, y, estimator, path, **kwargs):
 """ Test various estimators. """
 
    y = LabelEncoder().fit_transform(y)
    model = Pipeline([
         ('one_hot_encoder', OneHotEncoder()), 
         ('estimator', estimator)
    ])

    _, ax = plt.subplots()

    # Instantiate the classification model and visualizer
    visualizer = ClassificationReport(
        model, classes=['edible', 'poisonous'], 
        cmap="YlGn", size=(600, 360), ax=ax, **kwargs
    )
    visualizer.fit(X, y)  
    visualizer.score(X, y)
    visualizer.poof(outpath=path)