code: def get_world_opt(config: DictConfig):
      """
      Generates the main chat world opt from Mephisto config.
      """
      blueprint_data = config.mephisto.blueprint
      previous_personas_count = load_previously_used_personas_counts(
          blueprint_data.persona_counts_file
      )
      num_max_persona_use = blueprint_data.max_times_persona_use
      personas = load_apprentice_persona_list(
          blueprint_data.personas_file, blueprint_data.shuffle_persona
      )
      personas = remove_overused_persona(
          personas, previous_personas_count, num_max_persona_use
      )
      locations = get_persona_locations(blueprint_data.locations_file)
      return {
          "send_task_data": True,
          "min_turns": blueprint_data.min_turns,
          "wizard_time_out": blueprint_data.wizard_time_out,
          "apprentice_time_out": blueprint_data.apprentice_time_out,
          "search_warning_turn": blueprint_data.search_warning_turn,
          "search_warning_threshold": blueprint_data.search_warning_threshold,
          "select_warning_turn": blueprint_data.select_warning_turn,
          "select_warning_threshold": blueprint_data.select_warning_threshold,
          "personas": personas,
          "prev_persona_count": previous_personas_count,
          "max_times_persona_use": num_max_persona_use,
          "locations": locations,
          "pick_persona_with_replacement": blueprint_data.use_personas_with_replacement,
          "search_server": blueprint_data.search_server,
          "num_passages_retrieved": blueprint_data.num_passages_retrieved,
          "soft_block_qname": blueprint_data.block_qualification,
          constants.ROLE_QUALIFICATION_NAME_KEY: blueprint_data.role_qualification,
      }
  
imports: import random
  import os
  from collections import defaultdict
  import hydra
  from omegaconf import DictConfig
  from dataclasses import dataclass, field
  from typing import List, Dict, Any
  from parlai.crowdsourcing.projects.wizard_of_internet import constants
  from parlai.crowdsourcing.projects.wizard_of_internet.wizard_internet_blueprint import WIZARD_INTERNET_PARLAICHAT_BLUEPRINT
  from parlai.crowdsourcing.utils.mturk import MTurkRunScriptConfig
  import parlai.utils.logging
  from mephisto.abstractions.databases.local_database import LocalMephistoDB
  from mephisto.abstractions.blueprints.parlai_chat.parlai_chat_blueprint import SharedParlAITaskState
  from mephisto.operations.operator import Operator
  from mephisto.operations.hydra_config import register_script_config
  from mephisto.tools.scripts import load_db_and_process_config
label_desc: Use image node_id 5 for calling a global function with example usage: get_world_opt(config) and returns: dict