code: 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.show(outpath=path)
  
file_path: yellowbrick/docs/tutorial.py
imports: import matplotlib.pyplot
  from sklearn.pipeline import Pipeline
  from sklearn.svm import LinearSVC, NuSVC, SVC
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.preprocessing import OneHotEncoder, LabelEncoder
  from sklearn.linear_model import LogisticRegressionCV, LogisticRegression, SGDClassifier
  from sklearn.ensemble import BaggingClassifier, ExtraTreesClassifier, RandomForestClassifier
  from yellowbrick.datasets import load_mushroom
  from yellowbrick.classifier import ClassificationReport
label_desc: Use image node_id 1 for calling a global function with example usage: visualize_model(X, y, estimator, path) without return types