input: Write a function to implement a fuzzy search algorithm in Python that can match strings with near similarities by calculating the Levenshtein distance between a query string and a list of choice strings. The function should return a list of strings from the choices that are within a given threshold of similarity to the query string.
  
  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
  
  assert find_matches("apple", ["apples", "pineapple", "applet", "banana"], 2) == ["apples", "applet"]
  assert find_matches("hello", ["hella", "help", "hell", "jello"], 1) == ["hella", "hell"]
  assert find_matches("cat", ["dog", "rat", "bat", "hat"], 3) == []
  assert find_matches("python", ["pithon", "pythn", "pythin", "python"], 2) == ["pithon", "pythn", "pythin"]
  assert find_matches("", ["a", "b", "c"], 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