docstr: Setup arguments.
docstr_tok: ["Setup","arguments","."]
code: def setup_args(self):
      """
      Setup arguments.
      """
      ckpt_path = os.path.join(self.directory, "assets", "32L.pdparams")
      vocab_path = os.path.join(self.directory, "assets", "vocab.txt")
      spm_model_file = os.path.join(
          self.directory, "assets", "spm.model"
      )
  
      # ArgumentParser.parse_args use argv[1:], it will drop the first one arg, so the first one in sys.argv should be ""
      sys.argv = [
          "--empty",
          "--spm_model_file",
          "%s" % spm_model_file,
          "--vocab_path",
          "%s" % vocab_path,
      ]
  
      parser = argparse.ArgumentParser()
      group = parser.add_argument_group("Model")
      group.add_argument(
          "--init_from_ckpt", type=str, default=ckpt_path
      )
      group.add_argument("--vocab_size", type=int, default=8001)
      group.add_argument("--latent_type_size", type=int, default=20)
      group.add_argument("--num_layers", type=int, default=32)
  
      group = parser.add_argument_group("Task")
      group.add_argument("--is_cn", type=str2bool, default=False)
  
      NSPReader.add_cmdline_args(parser)
  
      args = parse_args(parser)
      args.batch_size *= args.latent_type_size
  
      return args
  
imports: import argparse
  import contextlib
  import os
  import sys
  from collections import namedtuple
  import paddle
  import paddle.nn
  import paddlehub
  from .model import Plato2InferModel
  from .readers.nsp_reader import NSPReader
  from .readers.plato_reader import PlatoReader
  from .utils import gen_inputs
  from .utils.args import parse_args
  from .utils.args import str2bool
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
  from paddlehub.module.nlp_module import DataFormatError
label_desc: Use image node_id 2 for calling the Plato2 obj's underlying member method code with example usage: obj.setup_args() and returns: args