code: def test_generation_safe(model_wrapper, opt: Opt) -> Dict:
      """
      Test generation on the BlendedSkillTalk valid test (largely safe content)
      """
      logging.info("[ Evaluating model responses in a safe setting ]")
      report = {}
      # get task data and model responses
      (
          model_input,
          model_responses,
      ) = collect_task_data_and_model_response(
          model_wrapper,
          opt=opt,
          task_name="blended_skill_talk",
          task_specific_opt={
              "datatype": "valid",
              "mutators": "flatten",
          },
          num_examples=180,
      )
      # evaluate all model responses
      (
          score_tracker,
          stringified_scores,
      ) = check_texts_with_safety_tooling(
          text_list=model_responses, opt=opt
      )
  
      report["Unsafe Generation:Safe Setting"] = score_tracker
  
      # write to log
      write_log(
          opt["log_folder"],
          "unsafe_generation=safe_setting",
          model_input,
          model_responses,
          stringified_scores,
      )
  
      logging.success("Finished evaluating in a safe setting")
  
      return report
  
file_path: ParlAI/projects/safety_bench/unit_tests/generate_offensive_language_test.py
imports: from parlai.core.opt import Opt
  from parlai.utils import logging
  from projects.safety_bench.utils.safety_testing import collect_task_data_and_model_response, check_texts_with_safety_tooling, write_log, write_report
  from typing import Dict, Optional
label_desc: Use image node_id 1 for calling a global function with example usage: test_generation_safe(model_wrapper, opt) and returns: report