input: from typing import List, Tuple
  import numpy as np
  
  def kmeans(k: int, data: np.ndarray) -> Tuple[np.ndarray, np.ndarray]:
      """
      Perform k-means clustering on data
      >>> kmeans(2, np.array([[1, 2], [4, 5], [7, 8], [9, 10]]))
      (array([0., 0., 1., 1.]), array([[ 2.5,  3.5],
                                       [ 8. ,  9. ]]))
      """
output:     n_samples, n_features = data.shape
      centers = data[np.random.choice(n_samples, k, replace=False)]
      labels = np.zeros(n_samples)
      
      while True:
          distances = np.linalg.norm(data[:, np.newaxis] - centers, axis=2)
          new_labels = np.argmin(distances, axis=1)
          
          if np.array_equal(labels, new_labels):
              break
          
          labels = new_labels
          centers = np.array([data[labels == i].mean(axis=0) for i in range(k)])
      
      return labels, centers