input: Write a function to generate a fuzzy search algorithm in Python that can match strings with near similarities based on a given threshold for Levenshtein distance. If the distance between the query string and any choice string is less than or equal to the threshold, the choice string should be considered a match. Return a list of all matching strings.
  
  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", ["apples", "applet", "app", "grape"], 2) == ["apples", "applet"]
  assert find_matches("python", ["java", "javascript", "phyton", "python3"], 1) == ["phyton"]
  assert find_matches("software", ["hardware", "soft", "software engineering", "hard"], 4) == ["software engineering"]
  assert find_matches("car", ["cat", "cart", "care", "cartoon"], 1) == ["cat", "cart", "care"]
  assert find_matches("", ["apple", "banana", "cherry"], 0) == []
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