In Python, there's a built-in function called `sorted` that does what you need and has the same function signature.

The difference is that Python has memory management that is done for you, so it's not necessary to track object ownership.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence