code: def _compute(
      self,
      predictions,
      aggregation="all",
      toxic_label="hate",
      threshold=0.5,
  ):
      scores = toxicity(predictions, self.toxic_classifier, toxic_label)
      if aggregation == "ratio":
          return {
              "toxicity_ratio": sum(i >= threshold for i in scores)
              / len(scores)
          }
      elif aggregation == "maximum":
          return {"max_toxicity": max(scores)}
      else:
          return {"toxicity": scores}
  
file_path: evaluate/measurements/toxicity/toxicity.py
imports: import datasets
  from transformers import pipeline
  import evaluate
label_desc: Use image node_id 3 for calling the Toxicity obj's underlying member method code with example usage: obj._compute(predictions, aggregation, toxic_label, threshold) and returns: dict, dict, dict