Now, convert this code into a function instead. Add a docstring in numpy format to it containing a description of what the function does, its inputs and outputs.
spam lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor creativity violence