code: def test_convergence_warning(X, y, max_iter):
      """Test that the ConvergenceWarning is raised."""
      clf = CrossEntropyLearningShapelets(
          learning_rate=1e-3,
          tol=1e-9,
          random_state=42,
          max_iter=max_iter,
      )
      msg = (
          "Maximum number of iterations reached without converging. Increase "
          "the maximum number of iterations."
      )
      with pytest.warns(ConvergenceWarning, match=msg):
          clf.fit(X, y)
  
imports: import numpy
  import pytest
  import re
  from sklearn.exceptions import ConvergenceWarning
  from pyts.classification.learning_shapelets import CrossEntropyLearningShapelets
  from pyts.classification import LearningShapelets
  from pyts.classification.learning_shapelets import _expit, _xlogy, _softmin, _softmin_grad, _softmax, _derive_shapelet_distances, _derive_all_squared_distances, _reshape_list_shapelets, _reshape_array_shapelets, _loss, _grad_weights, _grad_shapelets
label_desc: Use image node_id 16 for calling a global function with example usage: test_convergence_warning(X, y, max_iter) without return types