input: Write a function to implement a fuzzy search algorithm in Python that can match strings with near similarities based on a given threshold. The function should take a query string, a list of choices, and an integer threshold as input, and return a list of choices that have a Levenshtein distance from the query less than or equal to the threshold. If no matches are found, the function should return an empty list. 
  
  def find_matches(query, choices, threshold):
      # Convert query and choices to lower case
      query, choices = query.lower(), [choice.lower() for choice in choices]
      # Initialize empty list to store matches
      matches = []
      
      # Loop through each choice
      for choice in choices:
          # Calculate Levenshtein distance between query and choice
          distance = levenshtein_distance(query, choice)
          # If distance is less than threshold, append choice to matches
          if distance <= threshold:
              matches.append(choice)
      
      return matches
  
  assert find_matches("apple", ["aple", "aplle", "appel", "banana"], 2) == ["aple", "aplle", "appel"]
  assert find_matches("cat", ["bat", "hat", "mat", "dog"], 1) == ["bat", "hat"]
  assert find_matches("python", ["pytho", "pyton", "pytohn", "cython"], 2) == ["pytho", "pyton", "pytohn"]
  assert find_matches("hello", ["jello", "mello", "yellow", "cello"], 3) == ["jello", "mello", "yellow"]
  assert find_matches("kitten", ["sitting", "kittens", "mittens", "kit"], 4) == ["sitting", "kittens"]
output: def find_matches(query, choices, threshold):
      query = query.lower()
      choices = [choice.lower() for choice in choices]
      matches = []
      
      for choice in choices:
          distance = levenshtein_distance(query, choice)
          if distance <= threshold:
              matches.append(choice)
      
      return matches