From: https://github.com/QwenLM/Qwen-Image/blob/main/src/examples/tools/prompt_utils.pypolish_edi...