The Python package Sympy.stats has a function `Die` for the operation you want. You can also use Numpy to write the expected value calculation yourself.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence