class_docstr: Stanford Sentiment Treebank, binary version (SST-2).
  
  See https://www.tensorflow.org/datasets/catalog/glue#gluesst2.
class_docstr_tok: ["Stanford","Sentiment","Treebank",",","binary","version","(","SST-2",")",".","See","https",":","\/\/www.tensorflow.org\/datasets\/catalog\/glue","#","gluesst2","."]
code: def load_from_tfds(self, split: str):
      if split not in self.TFDS_SPLITS:
          raise ValueError(
              f"Unsupported split '{split}'. Allowed values: {self.TFDS_SPLITS}"
          )
      ret = []
      for ex in load_tfds("glue/sst2", split=split):
          ret.append(
              {
                  "sentence": ex["sentence"].decode("utf-8"),
                  "label": self.LABELS[ex["label"]],
              }
          )
      return ret
  
imports: from typing import Optional
  from lit_nlp.api import dataset
  from lit_nlp.api import types
  from lit_nlp.lib import file_cache
  from lit_nlp.lib import utils
  import pandas
  import tensorflow_datasets
label_desc: Use image node_id 2 for calling the SST2Data obj's underlying member method code with example usage: obj.load_from_tfds(split) and returns: ret