docstr: Test whether centroid collapses to single datapoint with non-zero weight.
code: def test_kmodes_sample_weights_all_but_one_zero(self):
      """Test whether centroid collapses to single datapoint with non-zero weight."""
      kmodes = KModes(n_clusters=1, init="Cao", random_state=42)
      n_samples = 10
      for indicator in range(n_samples):
          sample_weight = np.zeros(n_samples)
          sample_weight[indicator] = 1
          model = kmodes.fit(
              TEST_DATA[:n_samples, :], sample_weight=sample_weight
          )
          self.assertTrue(
              (
                  model.cluster_centroids_[0, :]
                  == TEST_DATA[indicator, :]
              ).all()
          )
  
imports: import pickle
  import unittest
  import numpy
  import pandas
  from kmodes.kmodes import KModes
  from kmodes.util.dissim import ng_dissim, jaccard_dissim_binary, jaccard_dissim_label
label_desc: Use image node_id 27 for calling the TestKModes obj's underlying member method code with example usage: obj.test_kmodes_sample_weights_all_but_one_zero() without return types