this is kmeans source code based on python for PR