code: def test_prediction_error_custom_artist(
      pyplot, regressor_fitted, class_method
  ):
      """Check that we can tune the style of the lines."""
      extra_params = {
          "kind": "actual_vs_predicted",
          "scatter_kwargs": {"color": "red"},
          "line_kwargs": {"color": "black"},
      }
      if class_method == "from_estimator":
          display = PredictionErrorDisplay.from_estimator(
              regressor_fitted, X, y, **extra_params
          )
      else:
          y_pred = regressor_fitted.predict(X)
          display = PredictionErrorDisplay.from_predictions(
              y_true=y, y_pred=y_pred, **extra_params
          )
  
      assert display.line_.get_color() == "black"
      assert_allclose(
          display.scatter_.get_edgecolor(), [[1.0, 0.0, 0.0, 0.8]]
      )
  
      # create a display with the default values
      if class_method == "from_estimator":
          display = PredictionErrorDisplay.from_estimator(
              regressor_fitted, X, y
          )
      else:
          y_pred = regressor_fitted.predict(X)
          display = PredictionErrorDisplay.from_predictions(
              y_true=y, y_pred=y_pred
          )
      pyplot.close("all")
  
      display.plot(**extra_params)
      assert display.line_.get_color() == "black"
      assert_allclose(
          display.scatter_.get_edgecolor(), [[1.0, 0.0, 0.0, 0.8]]
      )
  
file_path: scikit-learn/sklearn/metrics/_plot/tests/test_predict_error_display.py
imports: import pytest
  from numpy.testing import assert_allclose
  from sklearn.datasets import load_diabetes
  from sklearn.exceptions import NotFittedError
  from sklearn.linear_model import Ridge
  from sklearn.metrics import PredictionErrorDisplay
label_desc: Use image node_id 7 for calling a global function with example usage: test_prediction_error_custom_artist(pyplot, regressor_fitted, class_method) without return types