code: def test_kmeans_and_kmeans2_random_seed(self):
      seed_list = [
          1234,
          np.random.RandomState(1234),
          np.random.default_rng(1234),
      ]
  
      for seed in seed_list:
          # test for kmeans
          res1, _ = kmeans(TESTDATA_2D, 2, seed=seed)
          res2, _ = kmeans(TESTDATA_2D, 2, seed=seed)
          assert_allclose(res1, res1)  # should be same results
  
          # test for kmeans2
          for minit in ["random", "points", "++"]:
              res1, _ = kmeans2(TESTDATA_2D, 2, minit=minit, seed=seed)
              res2, _ = kmeans2(TESTDATA_2D, 2, minit=minit, seed=seed)
              assert_allclose(res1, res1)
  
imports: import warnings
  import sys
  import numpy
  from numpy.testing import assert_array_equal, assert_allclose, assert_equal, assert_, suppress_warnings
  import pytest
  from pytest import raises
  from scipy.cluster.vq import kmeans, kmeans2, py_vq, vq, whiten, ClusterError, _krandinit
  from scipy.cluster import _vq
  from scipy.conftest import array_api_compatible, skip_if_array_api, skip_if_array_api_gpu
  from scipy.sparse._sputils import matrix
  from scipy._lib._array_api import SCIPY_ARRAY_API, copy, cov, xp_assert_close, xp_assert_equal
label_desc: Use image node_id 16 for calling the TestKMean obj's underlying member method code with example usage: obj.test_kmeans_and_kmeans2_random_seed() without return types