input: Write a function to implement a fuzzy search algorithm in Python that matches strings with near similarities by calculating the Levenshtein distance between them. The function should return a list of matches that have a Levenshtein distance less than or equal to a given threshold. If no matches are found, an empty list should be returned.
  
  def find_matches(query, choices, threshold):
      # Convert query and choices to lower case
      query, choices = query.lower(), [choice.lower() for choice in choices]
      # Initialize empty list to store matches
      matches = []
      
      # Loop through each choice
      for choice in choices:
          # Calculate Levenshtein distance between query and choice
          distance = levenshtein_distance(query, choice)
          # If distance is less than threshold, append choice to matches
          if distance <= threshold:
              matches.append(choice)
      
      return matches
  
  assert find_matches("apple", ["apple", "appel", "orange", "banana"], 1)==["apple", "appel"]
  assert find_matches("apple", ["apple", "pineapp", "orange", "banana"], 3)==["apple", "pineapp"]
  assert find_matches("hello", ["world", "helo", "help", "hell"], 2)==["helo"]
  assert find_matches("fuzzy", ["fizzy", "fuzy", "fzza"], 1)==["fizzy", "fuzy"]
  assert find_matches("query", [], 2)==[]
output: def find_matches(query, choices, threshold):
      query = query.lower()
      choices = [choice.lower() for choice in choices]
      matches = []
      
      for choice in choices:
          distance = levenshtein_distance(query, choice)
          if distance <= threshold:
              matches.append(choice)
      
      return matches