Can you rewrite that equation in python code instead of Julia code?  And write it as a function.
spam lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor creativity violence