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 representing the maximum allowable Levenshtein distance. It should return a list of choices that are within the specified distance from the query. The Levenshtein distance is calculated using the `levenshtein_distance` function.
  
  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", ["apples", "applet", "appetite", "apology"], 2) == ["apples", "applet"]
  assert find_matches("ferniture", ["furniture", "picture", "floor"], 3) == ["furniture"]
  assert find_matches("kitten", ["sitting", "kitting", "mittens"], 2) == ["sitting", "kitting"]
  assert find_matches("hello", ["hill", "hell", "hello"], 1) == ["hell", "hello"]
  assert find_matches("python", [], 0) == []
output: def find_matches(query, choices, threshold):
      query, choices = query.lower(), [choice.lower() for choice in choices]
      matches = []
      
      for choice in choices:
          distance = levenshtein_distance(query, choice)
          if distance <= threshold:
              matches.append(choice)
      
      return matches