code: def setup_args(cls):
      # Use default parlai args for logging + the like, but don't need model args since we specify those manually via command-line
      parser = TodWorldParser(
          True,
          False,
          "World for chatting with the TOD conversation structure",
      )
      # Following params are same as the `eval_model` script
      parser.add_argument(
          "--report-filename",
          type=str,
          help="Saves a json file of the evaluation report either as an "
          'extension to the model-file (if begins with a ".") or a whole '
          "file path. Set to the empty string to not save at all.",
      )
      parser.add_argument(
          "--world-logs",
          type=str,
          help="Saves a jsonl file containing all of the task examples and "
          "model replies.",
      )
      parser.add_argument(
          "--save-format",
          type=str,
          default="conversations",
          choices=["conversations", "parlai"],
      )
      parser.add_argument(
          "--num-episodes",
          type=int,
          default=10,
          help="Number of episodes to display. Set to -1 for infinity or the number of examples of the first agent with a non-unlimited number of episodes in the world.",
      )
      parser.add_argument(
          "-d", "--display-examples", type="bool", default=False
      )
      parser.add_argument(
          "-ltim", "--log-every-n-secs", type=float, default=10
      )
      TodWorldLogger.add_cmdline_args(parser)
  
      # Following are specific to TOD World
      parser.add_argument(
          "--max-turns",
          type=int,
          default=30,
          help="The max number of full turns before chat ends, excluding prompting",
      )
      TodWorldScript.setup_tod_args(parser)
  
      return parser
  
imports: import json
  from copy import deepcopy
  from shutil import copyfile
  import os
  import parlai.utils.logging
  import parlai.core.tod.tod_world
  import parlai.core.tod.tod_agents
  from parlai.core.agents import create_agent
  from parlai.core.metrics import dict_report, aggregate_unnamed_reports
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.script import ParlaiScript, register_script
  from parlai.utils.distributed import is_primary_worker, all_gather_list, is_distributed, get_rank, sync_object, num_workers
  from parlai.utils.io import PathManager
  from parlai.utils.misc import TimeLogger, nice_report
  from parlai.utils.world_logging import WorldLogger
label_desc: Use image node_id 2 for calling the TodWorldScript obj's underlying member method code with example usage: obj.setup_args(cls) and returns: parser