code: def _add_dataset_opts(parser, build_vocab_only=False):
      """Options related to training datasets, type: a list of dictionary."""
      group = parser.add_argument_group("Data")
      group.add(
          "-data",
          "--data",
          required=True,
          help="List of datasets and their specifications. "
          "See examples/*.yaml for further details.",
      )
      group.add(
          "-skip_empty_level",
          "--skip_empty_level",
          default="warning",
          choices=["silent", "warning", "error"],
          help="Security level when encounter empty examples."
          "silent: silently ignore/skip empty example;"
          "warning: warning when ignore/skip empty example;"
          "error: raise error & stop execution when encouter empty.",
      )
      group.add(
          "-transforms",
          "--transforms",
          default=[],
          nargs="+",
          choices=AVAILABLE_TRANSFORMS.keys(),
          help="Default transform pipeline to apply to data. "
          "Can be specified in each corpus of data to override.",
      )
  
      group.add(
          "-save_data",
          "--save_data",
          required=build_vocab_only,
          help="Output base path for objects that will "
          "be saved (vocab, transforms, embeddings, ...).",
      )
      group.add(
          "-overwrite",
          "--overwrite",
          action="store_true",
          help="Overwrite existing objects if any.",
      )
      group.add(
          "-n_sample",
          "--n_sample",
          type=int,
          default=(5000 if build_vocab_only else 0),
          help=(
              "Build vocab using "
              if build_vocab_only
              else "Stop after save "
          )
          + "this number of transformed samples/corpus. Can be [-1, 0, N>0]. "
          "Set to -1 to go full corpus, 0 to skip.",
      )
  
      if not build_vocab_only:
          group.add(
              "-dump_transforms",
              "--dump_transforms",
              action="store_true",
              help="Dump transforms `*.transforms.pt` to disk."
              " -save_data should be set as saving prefix.",
          )
      else:
          group.add(
              "-dump_samples",
              "--dump_samples",
              action="store_true",
              help="Dump samples when building vocab. "
              "Warning: this may slow down the process.",
          )
          group.add(
              "-num_threads",
              "--num_threads",
              type=int,
              default=1,
              help="Number of parallel threads to build the vocab.",
          )
          group.add(
              "-learn_subwords",
              "--learn_subwords",
              action="store_true",
              help="Learn subwords prior to building vocab",
          )
          group.add(
              "-learn_subwords_size",
              "--learn_subwords_size",
              type=int,
              default=32000,
              help="Learn subwords operations",
          )
          group.add(
              "-vocab_sample_queue_size",
              "--vocab_sample_queue_size",
              type=int,
              default=20,
              help="Size of queues used in the build_vocab dump path.",
          )
  
imports: import configargparse
  from onmt.modules.sru import CheckSRU
  from onmt.transforms import AVAILABLE_TRANSFORMS
  from onmt.constants import ModelTask
  from onmt.modules.position_ffn import ACTIVATION_FUNCTIONS
  from onmt.modules.position_ffn import ActivationFunction
  from onmt.constants import DefaultTokens
label_desc: Use image node_id 4 for calling a global function with example usage: _add_dataset_opts(parser, build_vocab_only) without return types