docstr: Ensure that arguments are properly configured to launch this task.
docstr_tok: ["Ensure","that","arguments","are","properly","configured","to","launch","this","task","."]
code: def assert_task_args(
      cls, args: "DictConfig", shared_state: "SharedTaskState"
  ) -> None:
      """
      Ensure that arguments are properly configured to launch this task.
      """
      ParlAIChatBlueprint.assert_task_args(
          args=args, shared_state=shared_state
      )
      blueprint = args.get("blueprint")
      # Check search module is valid
      assert hasattr(
          blueprint, "search_server"
      ), "Provide search API address."
  
      assert hasattr(blueprint, "use_personas_with_replacement")
      assert hasattr(shared_state, "world_opt")
      assert "personas" in shared_state.world_opt
  
      # Number of personas is enough for running without replacement
      if not blueprint.get("use_personas_with_replacement"):
          n_personas = len(shared_state.world_opt["personas"])
          n_conversations = blueprint.get("num_conversations")
          assert (
              n_personas >= n_conversations
          ), f"{n_personas} personas are not enought to use uniquely for {n_conversations} conversations."
  
      # Make sure that we first show the warning for using search more often
      # to the wizard, and then the warning for selecting more sentences.
      assert blueprint.get("search_warning_turn") <= blueprint.get(
          "select_warning_turn"
      )
  
file_path: ParlAI/parlai/crowdsourcing/projects/wizard_of_internet/wizard_internet_blueprint.py
imports: from dataclasses import dataclass, field
  from mephisto.operations.registry import register_mephisto_abstraction
  from mephisto.abstractions.blueprints.parlai_chat.parlai_chat_blueprint import ParlAIChatBlueprintArgs, ParlAIChatBlueprint
  from mephisto.abstractions.blueprint import SharedTaskState
  from omegaconf import DictConfig, MISSING
label_desc: Use image node_id 1 for calling the WizardOfInternetBlueprint obj's underlying member method code with example usage: obj.assert_task_args(cls, args, shared_state) without return types