docs: def impute_knn(df, k=3):
          """
          Nearest neighbour imputations which weights samples using the mean squared difference on features for which two rows both have observed data.
  
          :param df: The input dataframe that contains missing values
          :param k: The number of neighbours
          :return: the imputed dataframe
          """
          imputed_matrix = KNN(k=k).complete(df.values)
          imputed_df = pd.DataFrame(imputed_matrix, df.index, df.columns)
          return imputed_df