code: def test_affinity_propagation_random_state():
      """Check that different random states lead to different initialisations
      by looking at the center locations after two iterations.
      """
      centers = [[1, 1], [-1, -1], [1, -1]]
      X, labels_true = make_blobs(
          n_samples=300,
          centers=centers,
          cluster_std=0.5,
          random_state=0,
      )
      # random_state = 0
      ap = AffinityPropagation(
          convergence_iter=1, max_iter=2, random_state=0
      )
      ap.fit(X)
      centers0 = ap.cluster_centers_
  
      # random_state = 76
      ap = AffinityPropagation(
          convergence_iter=1, max_iter=2, random_state=76
      )
      ap.fit(X)
      centers76 = ap.cluster_centers_
      # check that the centers have not yet converged to the same solution
      assert np.mean((centers0 - centers76) ** 2) > 1
  
imports: import warnings
  import numpy
  import pytest
  from sklearn.cluster import AffinityPropagation, affinity_propagation
  from sklearn.cluster._affinity_propagation import _equal_similarities_and_preferences
  from sklearn.datasets import make_blobs
  from sklearn.exceptions import ConvergenceWarning, NotFittedError
  from sklearn.metrics import euclidean_distances
  from sklearn.utils._testing import assert_allclose, assert_array_equal
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 13 for calling a global function with example usage: test_affinity_propagation_random_state() without return types