def METHOD_NAME(self, prompt, negative_prompt):
    extracted = []
    applicable_styles = list(self.styles.values())
    while True:
        found_style = None
        for style in applicable_styles:
            is_match, new_prompt, new_neg_prompt = extract_style_from_prompts(style, prompt, negative_prompt)
            if is_match:
                found_style = style
                prompt = new_prompt
                negative_prompt = new_neg_prompt
                break
        if not found_style:
            break
        applicable_styles.remove(found_style)
        extracted.append(found_style.name)
    return list(reversed(extracted)), prompt, negative_prompt