input: Write a python function to perform K-Nearest Neighbors search using the Euclidean distance and return the k nearest neighbors.
  assert KNNSearch(3, np.array([[1, 1], [2, 2], [3, 3], [4, 4]]), np.array([[2, 2]])) == [np.matrix([[0.0, 1], [1.4142135623730951, 0], [2.8284271247461903, 2]])]
  assert KNNSearch(2, np.array([[1, 1], [1, 0], [0, 1], [0, 0]]), np.array([[0.5, 0.5]])) == [np.matrix([[0.7071067811865476, 0], [0.7071067811865476, 1]])]
  assert KNNSearch(1, np.array([[1, 1], [1, 2], [2, 2]]), np.array([[1, 1]])) == [np.matrix([[0.0, 0]])]
output: import numpy as np
  
  def KNNSearch(k, points, query_points):
      def euclidean_distance(point1, point2):
          return np.sqrt(np.sum((point1 - point2) ** 2))
      
      neighbors = []
      for query in query_points:
          distances = []
          for idx, point in enumerate(points):
              distance = euclidean_distance(query, point)
              distances.append((distance, idx))
          distances.sort(key=lambda x: x[0])
          k_nearest = np.matrix(distances[:k])
          neighbors.append(k_nearest)
      
      return neighbors