code: def _default_logic_tests(
      self, data: Optional[Iterable[Tuple]], num_test_cases: int = 100
  ):
      template = self.editor.template(
          (
              "{nouns1} are {compare} than {nouns2}",
              "{nouns2} are {compare} than {nouns1}",
          ),
          nsamples=num_test_cases,
          remove_duplicates=True,
      )
  
      test = MFT(
          **template,
          labels=self._contradicts,
          name='"A is COMP than B" contradicts "B is COMP than A"',
          capability="Logic",
          description='Eg. "A is better than B" contradicts "B is better than A"',
      )
  
      self.add_test(test)
  
      if data:
          template = Perturb.perturb(
              data,
              lambda x: (x[0], x[0]),
              nsamples=num_test_cases,
              keep_original=False,
          )
          template += Perturb.perturb(
              data,
              lambda x: (x[1], x[1]),
              nsamples=num_test_cases,
              keep_original=False,
          )
  
          test = MFT(
              **template,
              labels=self._entails,
              name="A entails A (premise == hypothesis)",
              capability="Logic",
              description="If premise and hypothesis are the same, then premise entails the hypothesis",
          )
  
          self.add_test(test)
  
imports: from typing import Optional, Tuple, Iterable, Callable, Union
  import itertools
  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.predictors import Predictor
label_desc: Use image node_id 13 for calling the TextualEntailmentSuite obj's underlying member method code with example usage: obj._default_logic_tests(data, num_test_cases) without return types