class_docstr: This suite was built using the checklist process with the self.editor
  suggestions. Users are encouraged to add/modify as they see fit.
  
  Note: `editor.suggest(...)` can be slow as it runs a language model.
class_docstr_tok: ["This","suite","was","built","using","the","checklist","process","with","the","self.editor","suggestions",".","Users","are","encouraged","to","add\/modify","as","they","see","fit",".","Note",":","`","editor.suggest","(","...",")","`","can","be","slow","as","it","runs","a","language","model","."]
code: def _default_temporal_tests(
      self, data: Optional[Iterable[str]], num_test_cases: int = 100
  ):
      self._setup_editor()
  
      change = ["but", "even though", "although", ""]
      template = self.editor.template(
          [
              "I used to think this {noun} was {neg_adj}, {change} now I think it is {pos_adj}.",
              "I think this {noun} is {pos_adj}, {change} I used to think it was {neg_adj}.",
              "In the past I thought this {noun} was {neg_adj}, {change} now I think it is {pos_adj}.",
              "I think this {noun} is {pos_adj}, {change} in the past I thought it was {neg_adj}.",
          ],
          change=change,
          unroll=True,
          nsamples=num_test_cases,
          save=True,
          labels=self._positive,
      )
      template += self.editor.template(
          [
              "I used to {neg_verb_present} this {noun}, {change} now I {pos_verb_present} it.",
              "I {pos_verb_present} this {noun}, {change} I used to {neg_verb_present} it.",
              "In the past I would {neg_verb_present} this {noun}, {change} now I {pos_verb} it.",
              "I {pos_verb_present} this {noun}, {change} in the past I would {neg_verb_present} it.",
          ],
          change=change,
          unroll=True,
          nsamples=num_test_cases,
          save=True,
          labels=self._positive,
      )
  
      template += self.editor.template(
          [
              "I used to think this {noun} was {pos_adj}, {change} now I think it is {neg_adj}.",
              "I think this {noun} is {neg_adj}, {change} I used to think it was {pos_adj}.",
              "In the past I thought this {noun} was {pos_adj}, {change} now I think it is {neg_adj}.",
              "I think this {noun} is {neg_adj}, {change} in the past I thought it was {pos_adj}.",
          ],
          change=change,
          unroll=True,
          nsamples=num_test_cases,
          save=True,
          labels=self._negative,
      )
      template += self.editor.template(
          [
              "I used to {pos_verb_present} this {noun}, {change} now I {neg_verb_present} it.",
              "I {neg_verb_present} this {noun}, {change} I used to {pos_verb_present} it.",
              "In the past I would {pos_verb_present} this {noun}, {change} now I {neg_verb_present} it.",
              "I {neg_verb_present} this {noun}, {change} in the past I would {pos_verb_present} it.",
          ],
          change=change,
          unroll=True,
          nsamples=num_test_cases,
          save=True,
          labels=self._negative,
      )
      test = MFT(
          **template,
          name="Used to, but now",
          capability="Temporal",
          description="Have two conflicing statements, one about the past and "
          "one about the present."
          "Expect the present to carry the sentiment. Examples:\n"
          "I used to love this airline, now I hate it -> should be negative\n"
          "I love this airline, although I used to hate it -> should be positive",
      )
  
      self.add_test(test)
  
      adjectives = (
          self.editor.lexicons["pos_adj"]
          + self.editor.lexicons["neg_adj"]
      )
      verbs = (
          self.editor.lexicons["pos_verb_present"]
          + self.editor.lexicons["neg_verb_present"]
      )
  
      template = self.editor.template(
          [
              "{it} {be} {a:adj} {noun}.",
              "I used to think {it} {be} {a:adj} {noun}.",
          ],
          it=["it", "this", "that"],
          be=["is", "was"],
          adj=adjectives,
          save=True,
          nsamples=num_test_cases,
      )
      template += self.editor.template(
          [
              "{i} {verb} {the} {noun}.",
              "{i} used to {verb} {the} {noun}.",
          ],
          i=["I", "We"],
          the=["this", "that", "the"],
          verb=verbs,
          save=True,
          nsamples=num_test_cases,
      )
      test = DIR(
          template.data,
          self.monotonic_label_down,
          templates=template.templates,
          name="'Used to' should reduce",
          capability="Temporal",
          description="A model should not be more confident on 'I used to think X' "
          "when compared to 'X', e.g. 'I used to love this restaurant' "
          "should have less confidence than 'I love this restaurant'",
      )
  
      self.add_test(test)
  
imports: from typing import Optional, Iterable, List, Union, Tuple
  import numpy
  from checklist.test_suite import TestSuite
  from checklist.test_types import MFT, INV, DIR, Expect
  from checklist.perturb import Perturb
  from allennlp.confidence_checks.task_checklists.task_suite import TaskSuite
  from allennlp.confidence_checks.task_checklists import utils
  from allennlp.data.instance import Instance
  from allennlp.predictors import Predictor
label_desc: Use image node_id 9 for calling the SentimentAnalysisSuite obj's underlying member method code with example usage: obj._default_temporal_tests(data, num_test_cases) without return types