input: Write a python function to find matches from a list of choices based on a query and a threshold using Levenshtein distance.
  assert find_matches("hello", ["hallo", "hullo", "hell", "help"], 2)==["hallo", "hullo", "hell"]
  assert find_matches("apple", ["apply", "apples", "maple", "ape"], 1)==["apply"]
  assert find_matches("test", ["taste", "tset", "tests", "testing"], 1)==["tset"]
output: def find_matches(query, choices, threshold):
      def levenshtein_distance(a, b):
          if len(a) < len(b):
              return levenshtein_distance(b, a)
          
          if len(b) == 0:
              return len(a)
          
          previous_row = range(len(b) + 1)
          for i, c1 in enumerate(a):
              current_row = [i + 1]
              for j, c2 in enumerate(b):
                  insertions = previous_row[j + 1] + 1
                  deletions = current_row[j] + 1
                  substitutions = previous_row[j] + (c1 != c2)
                  current_row.append(min(insertions, deletions, substitutions))
              previous_row = current_row
          
          return previous_row[-1]
      
      return [choice for choice in choices if levenshtein_distance(query, choice) <= threshold]