input: Write a function to implement a fuzzy search algorithm that can match strings with near similarities based on the Levenshtein distance. Given a query string, a list of choices, and a threshold value, the function should return a list of matches from the choices that have a Levenshtein distance less than or equal to the threshold.
  
  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", ["apfel", "applet", "bubble", "appstore"], 2) == ["apfel", "applet"]
  assert find_matches("kitten", ["sitting", "kitchen", "kite", "kittens"], 3) == ["sitting", "kittens"]
  assert find_matches("flaw", ["lawn", "flask", "flab", "flat"], 2) == ["lawn", "flab", "flat"]
  assert find_matches("python", ["ruby", "java", "javascript"], 1) == []
  assert find_matches("", ["hello", "world", "python"], 0) == ["", "hello", "world", "python"]
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