docstr: Test whether centroid collapses to single datapoint with non-zero weight.
code: def test_k_prototypes_sample_weight_all_but_one_zero(self):
      """Test whether centroid collapses to single datapoint with non-zero weight."""
      kproto = kprototypes.KPrototypes(
          n_clusters=1, init="Cao", random_state=42
      )
      n_samples = 2
      for indicator in range(n_samples):
          sample_weight = np.zeros(n_samples)
          sample_weight[indicator] = 1
          model = kproto.fit(
              STOCKS[:n_samples, :],
              categorical=[1, 2],
              sample_weight=sample_weight,
          )
          np.testing.assert_array_equal(
              model.cluster_centroids_[0, :], STOCKS[indicator, :]
          )
  
imports: import pickle
  import unittest
  import numpy
  import pandas
  from kmodes import kprototypes
  from kmodes.tests.test_kmodes import assert_cluster_splits_equal
  from kmodes.util.dissim import ng_dissim
label_desc: Use image node_id 25 for calling the TestKProtoTypes obj's underlying member method code with example usage: obj.test_k_prototypes_sample_weight_all_but_one_zero() without return types