code: def test_cooks_distance_ax():
      out_ax = plot.cooks_distance(X, y)
      fig, ax = plt.subplots(1, 1)
      assert out_ax is not ax
      out_ax = plot.cooks_distance(X, y, ax=ax)
      assert ax is out_ax
  
file_path: sklearn-evaluation/tests/test_regression.py
imports: import pytest
  import numpy
  import pandas
  from sklearn.datasets import make_regression
  import matplotlib.pyplot
  from matplotlib.testing.decorators import image_comparison
  from sklearn_evaluation import plot
label_desc: Use image node_id 6 for calling a global function with example usage: test_cooks_distance_ax() without return types