input: from typing import List
  
  def find_matches(query: str, choices: List[str], threshold: int) -> List[str]:
      """Returns a list of choices that are similar to the query based on the Levenshtein distance.
      The similarity is determined by a given threshold.
      >>> find_matches('abc', ['abc', 'ab', 'a', 'abcd', 'abc'], 1)
      ['abc', 'ab', 'abcd', 'abc']
      >>> find_matches('hello', ['helo', 'hell', 'hello world', 'hello'], 2)
      ['helo', 'hell', 'hello']
      """
output:     from Levenshtein import distance
      return [choice for choice in choices if distance(query, choice) <= threshold]