code: def test_max_iter(max_iter):
      clusters1, _ = mean_shift(X, max_iter=max_iter)
      ms = MeanShift(max_iter=max_iter).fit(X)
      clusters2 = ms.cluster_centers_
  
      assert ms.n_iter_ <= ms.max_iter
      assert len(clusters1) == len(clusters2)
  
      for c1, c2 in zip(clusters1, clusters2):
          assert np.allclose(c1, c2)
  
file_path: scikit-learn/sklearn/cluster/tests/test_mean_shift.py
imports: import warnings
  import numpy
  import pytest
  from sklearn.cluster import MeanShift, estimate_bandwidth, get_bin_seeds, mean_shift
  from sklearn.datasets import make_blobs
  from sklearn.metrics import v_measure_score
  from sklearn.utils._testing import assert_allclose, assert_array_equal
label_desc: Use image node_id 10 for calling a global function with example usage: test_max_iter(max_iter) without return types