code: def test_display_curve_not_fitted_errors(
      pyplot, data_binary, clf, Display
  ):
      """Check that a proper error is raised when the classifier is not
      fitted."""
      X, y = data_binary
      # clone since we parametrize the test and the classifier will be fitted
      # when testing the second and subsequent plotting function
      model = clone(clf)
      with pytest.raises(NotFittedError):
          Display.from_estimator(model, X, y)
      model.fit(X, y)
      disp = Display.from_estimator(model, X, y)
      assert model.__class__.__name__ in disp.line_.get_label()
      assert disp.estimator_name == model.__class__.__name__
  
imports: import numpy
  import pytest
  from sklearn.base import ClassifierMixin, clone
  from sklearn.calibration import CalibrationDisplay
  from sklearn.compose import make_column_transformer
  from sklearn.datasets import load_iris
  from sklearn.exceptions import NotFittedError
  from sklearn.linear_model import LogisticRegression
  from sklearn.metrics import ConfusionMatrixDisplay, DetCurveDisplay, PrecisionRecallDisplay, PredictionErrorDisplay, RocCurveDisplay
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import StandardScaler
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
label_desc: Use image node_id 7 for calling a global function with example usage: test_display_curve_not_fitted_errors(pyplot, data_binary, clf, Display) without return types