input: Write a function to implement a fuzzy search algorithm in Python that matches strings with near similarities based on a given threshold. The function should return a list of strings from the choices that are considered matches based on the Levenshtein distance metric. If no matches are found, the function should return an empty list.
  
  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", ["appel", "aplpe", "banana"], 2) == ["appel", "aplpe"]
  assert find_matches("orange", ["orang", "orng", "banana"], 1) == ["orang", "orng"]
  assert find_matches("grape", ["grpae", "banana", "grape"], 2) == ["grpae", "grape"]
  assert find_matches("kiwi", ["kiw", "kiwi", "banana"], 1) == ["kiw", "kiwi"]
  assert find_matches("mango", ["mago", "mango", "banana"], 0) == ["mango"]
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