code: def setup_args(parser=None, hidden=True):
      if parser is None:
          parser = ParlaiParser(True, True, "Build a dictionary.")
      dict_loop = parser.add_argument_group("Dictionary Loop Arguments")
      dict_loop.add_argument(
          "--dict-maxexs",
          default=-1,
          type=int,
          help="max number of examples to build dict on",
          hidden=hidden,
      )
      dict_loop.add_argument(
          "--dict-include-valid",
          default=False,
          type="bool",
          help="Include validation set in dictionary building "
          "for task.",
          hidden=hidden,
      )
      dict_loop.add_argument(
          "--dict-include-test",
          default=False,
          type="bool",
          help="Include test set in dictionary building for task.",
          hidden=hidden,
      )
      dict_loop.add_argument(
          "-ltim",
          "--log-every-n-secs",
          type=float,
          default=-1,
          hidden=hidden,
      )
      DictionaryAgent.add_cmdline_args(parser, partial_opt=None)
      return parser
  
file_path: ParlAI/parlai/scripts/build_dict.py
imports: from parlai.core.dict import DictionaryAgent
  from parlai.core.params import ParlaiParser, str2class
  from parlai.core.worlds import create_task
  from parlai.utils.misc import TimeLogger
  from parlai.utils.distributed import is_distributed
  from parlai.core.script import ParlaiScript, register_script
  from parlai.utils.io import PathManager
  import parlai.utils.logging
  import copy
  import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: setup_args(parser, hidden) and returns: parser