code: def setup_args(parser=None):
      if parser is None:
          parser = ParlaiParser(
              True, True, "Check task for offensive language"
          )
      # Get command line arguments
      parser.add_argument(
          "-ltim", "--log-every-n-secs", type=float, default=2
      )
      parser.add_argument(
          "-d", "--display-examples", type="bool", default=False
      )
      parser.add_argument(
          "--safety",
          type=str,
          default="all",
          choices={"string_matcher", "classifier", "all"},
          help="Type of safety detector to apply to messages",
      )
      parser.set_defaults(datatype="train:ordered")
      parser.set_defaults(model="repeat_query")
      return parser
  
file_path: ParlAI/parlai/scripts/detect_offensive_language.py
imports: from parlai.core.params import ParlaiParser
  from parlai.core.agents import create_agent
  from parlai.core.worlds import create_task
  from parlai.utils.safety import OffensiveStringMatcher, OffensiveLanguageClassifier
  from parlai.utils.misc import TimeLogger
  import parlai.utils.logging
  from parlai.core.script import ParlaiScript, register_script
label_desc: Use image node_id 1 for calling a global function with example usage: setup_args(parser) and returns: parser