class_docstr: Jigsaw toxicity dataset; see https://www.tensorflow.org/datasets/catalog/wikipedia_toxicity_subtypes.
class_docstr_tok: ["Jigsaw","toxicity","dataset",";","see","https",":","\/\/www.tensorflow.org\/datasets\/catalog\/wikipedia_toxicity_subtypes","."]
docstr: Dataset spec, which should match the model"s input_spec().
docstr_tok: ["Dataset","spec",",","which","should","match","the","model","''","s","input_spec","(",")","."]
code: def spec(self) -> lit_types.Spec:
      """Dataset spec, which should match the model"s input_spec()."""
      return {
          "sentence": lit_types.TextSegment(),
          "label": lit_types.CategoryLabel(vocab=self.LABELS),
          "identity_attack": lit_types.Boolean(),
          "insult": lit_types.Boolean(),
          "obscene": lit_types.Boolean(),
          "severe_toxicity": lit_types.Boolean(),
          "threat": lit_types.Boolean(),
      }
  
imports: from typing import Optional
  from absl import logging
  from lit_nlp.api import dataset
  from lit_nlp.api import types
  import pandas
  import tensorflow_datasets
label_desc: Use image node_id 2 for calling the ToxicityData obj's underlying member method code with example usage: obj.spec() and returns: dict