⚡️ Speed up method `ErrorMessage._format_plain_reason` by 12% in PR #6028 (`PlaygroundPage`)
Here's the optimized version of the given Python program.
These changes ensure the program runs faster by reducing redundant operations and optimizing the existing logic to use simpler and efficient patterns.