code: def test_offensive(self):
      from parlai.scripts.detect_offensive_language import (
          DetectOffensive,
      )
  
      report = DetectOffensive.main(
          task="babi:task1k:10",
          datatype="valid",
          safety="string_matcher",
      )
      assert report["string_offenses%"] == 0
      assert report["word_offenses"] == 0
      assert report["exs"] == 100
  
imports: import os
  import unittest
  from parlai.core.message import Message
  from parlai.core.mutators import MessageMutator, register_mutator
  import parlai.utils.testing
label_desc: Use image node_id 1 for calling the TestDetectOffensive obj's underlying member method code with example usage: obj.test_offensive() without return types