input: def kmeans(k, data):
      """
      Perform k-means clustering on data.
      >>> kmeans(2, np.array([[1, 2], [1, 4], [1, 0], [4, 2], [4, 4], [4, 0]]))
      (array([0., 0., 0., 1., 1., 1.]), array([[1., 2.], [4., 2.]]))
      >>> kmeans(3, np.array([[2, 1], [5, 8], [9, 2], [6, 4], [1, 8], [3, 7], [8, 6]]))
      (array([2., 0., 1., 0., 2., 0., 1.]), array([[6., 8.], [8.5, 4.], [2., 4.5]]))
      """
output:     import numpy as np
      from sklearn.cluster import KMeans
  
      kmeans = KMeans(n_clusters=k, random_state=0).fit(data)
      labels = kmeans.labels_
      centers = kmeans.cluster_centers_
  
      return labels, centers