class_docstr: Load model trained to detect offensive language in the context of single- turn
  dialogue utterances.
  
  This model was trained to be robust to adversarial examples created by humans. See
  <http://parl.ai/projects/dialogue_safety/> for more information.
class_docstr_tok: ["Load","model","trained","to","detect","offensive","language","in","the","context","of","single-","turn","dialogue","utterances",".","This","model","was","trained","to","be","robust","to","adversarial","examples","created","by","humans",".","See","<","http",":","\/\/parl.ai\/projects\/dialogue_safety\/",">","for","more","information","."]
code: def _create_safety_model(self, custom_model_file):
      from parlai.core.params import ParlaiParser
  
      parser = ParlaiParser(False, False)
      TransformerClassifierAgent.add_cmdline_args(
          parser, partial_opt=None
      )
      parser.set_params(
          model="transformer/classifier",
          model_file=custom_model_file,
          print_scores=True,
          data_parallel=False,
      )
      safety_opt = parser.parse_args([])
      return create_agent(safety_opt, requireModelExists=True)
  
imports: from parlai.agents.transformer.transformer import TransformerClassifierAgent
  from parlai.core.agents import create_agent, create_agent_from_shared
  from parlai.tasks.dialogue_safety.agents import OK_CLASS, NOT_OK_CLASS
  from parlai.utils.typing import TShared
  from parlai.utils.io import PathManager
  import parlai.utils.logging
  import os
label_desc: Use image node_id 3 for calling the OffensiveLanguageClassifier obj's underlying member method code with example usage: obj._create_safety_model(custom_model_file) and returns: create_agent