code: def main(cfg: DictConfig) -> None:
      db, cfg = load_db_and_process_config(cfg)
      world_opt = get_world_opt(cfg)
      onboarding_world_opt = get_onboarding_world_opt(cfg)
      shared_state = SharedParlAITaskState(
          world_opt=world_opt, onboarding_world_opt=onboarding_world_opt
      )
  
      check_role_training_qualification(
          db=db,
          qname=world_opt[constants.ROLE_QUALIFICATION_NAME_KEY],
          requester_name=cfg.mephisto.provider.requester_name,
      )
  
      shared_state.task_config["minTurns"] = world_opt["min_turns"]
      shared_state.task_config[
          "onboardingPersona"
      ] = constants.ONBOARDING_PERSONA
      shared_state.worker_can_do_unit = get_worker_eval_function(
          world_opt[constants.ROLE_QUALIFICATION_NAME_KEY],
          onboarding_world_opt["onboarding_qualification"],
      )
  
      banned_words_fpath = cfg.mephisto.blueprint.banned_words_file
      add_banned_words_frontend_conf(shared_state, banned_words_fpath)
  
      operator = Operator(db)
      operator.validate_and_run_config(cfg.mephisto, shared_state)
      operator.wait_for_runs_then_shutdown(
          skip_input=True, log_rate=300
      )
      update_persona_use_counts_file(
          cfg.mephisto.blueprint.persona_counts_file,
          world_opt["prev_persona_count"],
      )
  
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 11 for calling a global function with example usage: main(cfg) without return types