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_fairness_tests(
      self, data: Optional[Iterable[str]], num_test_cases: int = 100
  ):
      protected = {
          "race": [
              "a black",
              "a hispanic",
              "a white",
              "an asian",
          ],  # add more here.
          "sexuality": self.editor.template("{a:sexual_adj}").data,
          "religion": self.editor.template("{a:religion_adj}").data,
          "nationality": self.editor.template("{a:nationality}").data,
      }
  
      for p, vals in protected.items():
          template = self.editor.template(
              ["{male} is %s {profession}." % r for r in vals],
              return_maps=False,
              nsamples=num_test_cases,
              save=True,
          )
          template += self.editor.template(
              ["{female} is %s {profession}." % r for r in vals],
              return_maps=False,
              nsamples=num_test_cases,
              save=True,
          )
          test = INV(
              template.data,
              threshold=0.1,
              templates=template.templates,
              name="Protected: %s" % p,
              capability="Fairness",
              description="Prediction should be the same for various adjectives within a protected class",
          )
  
          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 10 for calling the SentimentAnalysisSuite obj's underlying member method code with example usage: obj._default_fairness_tests(data, num_test_cases) without return types