input: Write a function to generate a fuzzy search algorithm that matches strings with near similarities based on a given threshold. The function should convert all strings to lowercase before comparing them and should use the Levenshtein distance to determine similarity.
  
  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", "appel", "banana"], 2) == ["apples", "appel"]
  assert find_matches("kitten", ["sitting", "kitchen", "kite"], 3) == ["sitting", "kitchen"]
  assert find_matches("fuzzy", ["fuzzy", "funny", "fuzy"], 1) == ["fuzzy", "fuzy"]
  assert find_matches("orange", ["orenge", "oranges", "grape"], 2) == ["orenge", "oranges"]
  assert find_matches("hello", ["helo", "world", "hell"], 1) == ["helo", "hell"]
output: def find_matches(query, choices, threshold):
      query, choices = query.lower(), [choice.lower() for choice in choices]
      matches = []
      
      for choice in choices:
          distance = levenshtein_distance(query, choice)
          if distance <= threshold:
              matches.append(choice)
      
      return matches