input: from typing import List
  
  def find_matches(query: str, choices: List[str], threshold: int) -> List[str]:
      """ Generates a fuzzy search algorithm that matches strings with near similarities based on Levenshtein distance.
      >>> find_matches("apple", ["apples", "applet", "banana"], 2)
      ['apples', 'applet']
      >>> find_matches("cat", ["cut", "act", "bat"], 1)
      ['cut', 'act']
      """
      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
output:     from Levenshtein import distance as levenshtein_distance