    def _punctuation_test(self, data: Iterable, num_test_cases: int):
        """
        Checks if the model is invariant to presence/absence of punctuation.
        """
        template = Perturb.perturb(data, self.punctuation(), nsamples=num_test_cases)
        test = INV(
            template.data,
            name="Punctuation",
            description="Strip punctuation and / or add '.'",
            capability="Robustness",
        )
        self.add_test(test)
Checks if the model is invariant to presence/absence of punctuation.
allennlp/confidence_checks/task_checklists/task_suite.py