input: Write a python function to perform k-means clustering using the KMeans class from sklearn.
  assert (kmeans(2, np.array([[1, 2], [1, 4], [1, 0], [4, 2], [4, 4], [4, 0]]))==[0, 0, 0, 1, 1, 1]).all()
  assert (kmeans(3, np.array([[1, 2], [3, 3], [4, 5], [8, 8], [9, 10], [10, 12]]))==[0, 0, 0, 1, 1, 1]).all()
  assert (kmeans(2, np.array([[1, 2], [3, 3], [8, 8], [9, 9]]))==[0, 0, 1, 1]).all()
output: def kmeans(k, data):
      from sklearn.cluster import KMeans
      kmeans_model = KMeans(n_clusters=k, random_state=0).fit(data)
      return kmeans_model.labels_