input: def find_matches(query: str, choices: List[str], threshold: int) -> List[str]:
      """ Generate a fuzzy search algorithm that can match strings with near similarities.
      The function takes a query string, a list of choices, and a threshold value.
      The Levenshtein distance between the query and each choice is calculated.
      If the distance is less than or equal to the threshold, the choice is considered a match.
      The function returns a list of matching choices.
      
      >>> find_matches('apple', ['apples', 'maple', 'grape'], 2)
      ['apples']
      >>> find_matches('cat', ['cattle', 'tact', 'act'], 1)
      ['cattle', 'tact']
      """
output:     from Levenshtein import distance
  
      matches = []
      for choice in choices:
          if distance(query, choice) <= threshold:
              matches.append(choice)
      return matches