input: Write a function to generate a fuzzy search algorithm in Python that can match strings with near similarities. The function should take three arguments: `query`, `choices`, and `threshold`, where `query` is the string to search for, `choices` is a list of strings to compare against, and `threshold` is the maximum allowed Levenshtein distance for a match. The function should return a list of strings from `choices` that match the `query` within the given `threshold`. If no matches are found, it should return an empty list.
  
  assert find_matches("apple", ["apples", "applepie", "apricot", "grape"], 2) == ["apples", "applepie"]
  assert find_matches("cat", ["cats", "cutoff", "catalog", "catch"], 1) == ["cats", "cutoff", "catch"]
  assert find_matches("example", ["exaggerate", "exam", "example", "exact"], 3) == ["exaggerate", "exam", "example", "exact"]
  assert find_matches("fuzzy", ["fuzzy", "puzzy", "muzzy", "buzzy"], 0) == ["fuzzy"]
  assert find_matches("python", ["peyton", "puton", "ptyhon", "python"], 2) == ["puton", "ptyhon", "python"]
output: def find_matches(query, choices, threshold):
      from Levenshtein import distance
      return [choice for choice in choices if distance(query, choice) <= threshold]