input: Write a function to generate a fuzzy search algorithm in Python that can match strings with near similarities. The function should take a query string, a list of choices, and a threshold value for the Levenshtein distance as inputs. The function should return a list of strings from the choices that are within the specified Levenshtein distance threshold of the query.
  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", ["appel", "apples", "banana", "applet"], 2)==["appel", "applet"]
  assert find_matches("python", ["pyhton", "pythan", "pythin", "java"], 1)==["pyhton", "pythan", "pythin"]
  assert find_matches("fuzzy", ["fuzzywuzzy", "fuzzi", "fuzy", "fuziness"], 3)==["fuzzywuzzy", "fuzy"]
  assert find_matches("search", ["searh", "serach", "fuzzy", "searcher"], 2)==["searh", "serach"]
  assert find_matches("", ["empty", "empt", "emptiness", "emptying"], 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