class_docstr: Base class for various task test suites.
  
  This is a wrapper class around the CheckList toolkit introduced
  in the paper
  [Beyond Accuracy: Behavioral Testing of NLP models with CheckList (Ribeiro et al)]
  (https://api.semanticscholar.org/CorpusID:218551201).
  
  !!! Note
      To use the checklist integration you should install ``allennlp`` with the
      "checklist" extra (e.g. ``conda install allennlp-checklist``,
      ``pip install allennlp[checklist]`` or just install `checklist` after the fact).
  
  Task suites are intended to be used as a form of behavioral testing
  for NLP models to check for robustness across several general linguistic
  capabilities; eg. Vocabulary, SRL, Negation, etc.
  
  An example of the entire checklist process can be found at:
  [https://github.com/marcotcr/checklist/blob/master/notebooks/tutorials/]
  (https://github.com/marcotcr/checklist/blob/master/notebooks/tutorials/).
  
  A task suite should contain tests that check general capabilities, including
  but not limited to:
  
  * Vocabulary + POS : Important words/word types for the task
  * Taxonomy : Synonyms/antonyms, etc.
  * Robustness : To typos, irrelevant changes, etc.
  * NER : Appropriately understanding named entities.
  * Temporal : Understanding the order of events.
  * Negation
  * Coreference
  * Semantic Role Labeling : Understanding roles such as agents and objects.
  * Logic : Ability to handle symmetry, consistency, and conjunctions.
  * Fairness
  
  
  # Parameters
  
  suite: `checklist.test_suite.TestSuite`, optional (default = `None`)
      Pass in an existing test suite.
  
  add_default_tests: `bool` (default = `False`)
      Whether to add default checklist tests for the task.
  
  data: `List[Any]`, optional (default = `None`)
      If the data is provided, and `add_default_tests` is `True`,
      tests that perturb the data are also added.
  
      For instance, if the task is sentiment analysis, and the a
      list of sentences is passed, it will add tests that check
      a model's robustness to typos, etc.
docstr: This returns a function which adds simple typos in relevant
  `str` inputs of a task's inputs.
  
  Expected arguments for this function: `(example, **args, **kwargs)`
  where the `example` is an instance of some task. It can be of any
  type.
  
  For example, for a sentiment analysis task, it will be a
  a `str` (the sentence for which we want to predict the sentiment).
  For a textual entailment task, it can be a tuple or a Dict, etc.
  
  Expected output of this function is a list of instances for the task,
  of the same type as `example`.
docstr_tok: ["This","returns","a","function","which","adds","simple","typos","in","relevant","`","str","`","inputs","of","a","task","'s","inputs",".","Expected","arguments","for","this","function",":","`","(","example",",","*","*","args",",","*","*","kwargs",")","`","where","the","`","example","`","is","an","instance","of","some","task",".","It","can","be","of","any","type",".","For","example",",","for","a","sentiment","analysis","task",",","it","will","be","a","a","`","str","`","(","the","sentence","for","which","we","want","to","predict","the","sentiment",")",".","For","a","textual","entailment","task",",","it","can","be","a","tuple","or","a","Dict",",","etc",".","Expected","output","of","this","function","is","a","list","of","instances","for","the","task",",","of","the","same","type","as","`","example","`","."]
code: def typos(cls) -> Callable:
      """
      This returns a function which adds simple typos in relevant
      `str` inputs of a task's inputs.
  
      Expected arguments for this function: `(example, **args, **kwargs)`
      where the `example` is an instance of some task. It can be of any
      type.
  
      For example, for a sentiment analysis task, it will be a
      a `str` (the sentence for which we want to predict the sentiment).
      For a textual entailment task, it can be a tuple or a Dict, etc.
  
      Expected output of this function is a list of instances for the task,
      of the same type as `example`.
      """
      return Perturb.add_typos
  
imports: import sys
  import logging
  from typing import Type, Optional, Dict, Any, Callable, List, Iterable, Union, TextIO, Tuple
  import numpy
  from checklist.test_suite import TestSuite
  from checklist.editor import Editor
  from checklist.test_types import MFT, INV, DIR
  from checklist.perturb import Perturb
  from allennlp.common.registrable import Registrable
  from allennlp.common.file_utils import cached_path
  from allennlp.predictors.predictor import Predictor
  from allennlp.confidence_checks.task_checklists import utils
label_desc: Use image node_id 12 for calling the TaskSuite obj's underlying member method code with example usage: obj.typos(cls) and returns: Perturb