code: def test_convergence_warning(setup):
      # This is a non-regression test for #5774
      X = np.array([[1.0, 0.0], [0.0, 1.0], [1.0, 2.5]])
      y = np.array([0, 1, -1])
  
      mdl = LabelPropagation(kernel="rbf", max_iter=1)
      with pytest.warns(ConvergenceWarning):
          mdl.fit(X, y)
      assert mdl.n_iter_ == mdl.max_iter
  
      mdl = LabelPropagation(kernel="rbf", max_iter=500)
      assert_no_warnings(mdl.fit, X, y)
  
file_path: mars/mars/learn/semi_supervised/tests/test_label_propagation.py
imports: import numpy
  import pytest
  from sklearn.datasets import make_classification
  from sklearn.model_selection import train_test_split
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.utils._testing import assert_no_warnings
  from ....None import tensor
  from ...metrics.pairwise import rbf_kernel
  from ...neighbors import NearestNeighbors
  from ..None import LabelPropagation
label_desc: Use image node_id 6 for calling a global function with example usage: test_convergence_warning(setup) without return types