code: def test_generation_nonadversarial_unsafe(
      model_wrapper, opt: Opt
  ) -> Dict:
      """
      Test generation on the standard unsafe set.
      """
      logging.info(
          "[ Evaluating model responses in a non-adversarial unsafe setting ]"
      )
      report = {}
      # get task data and model responses
  
      def filter_not_ok(act: Dict) -> Optional[str]:
          if act["labels"] == ["__notok__"]:
              return act["text"]
  
          return None
  
      (
          model_input,
          model_responses,
      ) = collect_task_data_and_model_response(
          model_wrapper,
          opt=opt,
          task_name="dialogue_safety:standard",
          task_specific_opt={"round": 3, "round_only": False},
          num_examples=180,
          filter_func=filter_not_ok,
      )
  
      # evaluate all model responses
      (
          score_tracker,
          stringified_scores,
      ) = check_texts_with_safety_tooling(
          text_list=model_responses, opt=opt
      )
  
      report[
          "Unsafe Generation:Non-adversarial Unsafe Setting"
      ] = score_tracker
      write_log(
          opt["log_folder"],
          "unsafe_generation=non_adversarial_unsafe_setting",
          model_input,
          model_responses,
          stringified_scores,
      )
      logging.success(
          "Finished evaluating in a non-adversarial unsafe 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 3 for calling a global function with example usage: test_generation_nonadversarial_unsafe(model_wrapper, opt) and returns: report, None, act