code: def test_dataframe_labels_used(pyplot, fitted_clf):
      """Check that column names are used for pandas."""
      pd = pytest.importorskip("pandas")
      df = pd.DataFrame(X, columns=["col_x", "col_y"])
  
      # pandas column names are used by default
      _, ax = pyplot.subplots()
      disp = DecisionBoundaryDisplay.from_estimator(
          fitted_clf, df, ax=ax
      )
      assert ax.get_xlabel() == "col_x"
      assert ax.get_ylabel() == "col_y"
  
      # second call to plot will have the names
      fig, ax = pyplot.subplots()
      disp.plot(ax=ax)
      assert ax.get_xlabel() == "col_x"
      assert ax.get_ylabel() == "col_y"
  
      # axes with a label will not get overridden
      fig, ax = pyplot.subplots()
      ax.set(xlabel="hello", ylabel="world")
      disp.plot(ax=ax)
      assert ax.get_xlabel() == "hello"
      assert ax.get_ylabel() == "world"
  
      # labels get overridden only if provided to the `plot` method
      disp.plot(ax=ax, xlabel="overwritten_x", ylabel="overwritten_y")
      assert ax.get_xlabel() == "overwritten_x"
      assert ax.get_ylabel() == "overwritten_y"
  
      # labels do not get inferred if provided to `from_estimator`
      _, ax = pyplot.subplots()
      disp = DecisionBoundaryDisplay.from_estimator(
          fitted_clf,
          df,
          ax=ax,
          xlabel="overwritten_x",
          ylabel="overwritten_y",
      )
      assert ax.get_xlabel() == "overwritten_x"
      assert ax.get_ylabel() == "overwritten_y"
  
imports: import warnings
  import numpy
  import pytest
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.datasets import load_diabetes, load_iris, make_classification, make_multilabel_classification
  from sklearn.ensemble import IsolationForest
  from sklearn.inspection import DecisionBoundaryDisplay
  from sklearn.inspection._plot.decision_boundary import _check_boundary_response_method
  from sklearn.linear_model import LogisticRegression
  from sklearn.preprocessing import scale
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
  from sklearn.utils._testing import assert_allclose, assert_array_equal
label_desc: Use image node_id 18 for calling a global function with example usage: test_dataframe_labels_used(pyplot, fitted_clf) without return types