code: def build_pretrain_args(
      language,
      dataset,
      charlm="default",
      command_args=None,
      extra_args=None,
      model_dir=DEFAULT_MODEL_DIR,
  ):
      """
      Returns one list with the args for this language & dataset's charlm and pretrained embedding
      """
      charlm = choose_charlm(
          language, dataset, charlm, default_charlms, ner_charlms
      )
      charlm_args = build_charlm_args(
          language, charlm, model_dir=model_dir
      )
  
      wordvec_args = []
      if (
          extra_args is None
          or "--wordvec_pretrain_file" not in extra_args
      ):
          # will throw an error if the pretrain can't be found
          wordvec_pretrain = find_wordvec_pretrain(
              language,
              default_pretrains,
              ner_pretrains,
              dataset,
              model_dir=model_dir,
          )
          wordvec_args = ["--wordvec_pretrain_file", wordvec_pretrain]
  
      bert_args = common.choose_transformer(
          language, command_args, extra_args, warn=False
      )
  
      return charlm_args + wordvec_args + bert_args
  
file_path: stanza/stanza/utils/training/run_ner.py
imports: import logging
  import os
  from stanza.models import ner_tagger
  from stanza.resources.common import DEFAULT_MODEL_DIR
  from stanza.utils.datasets.ner import prepare_ner_dataset
  from stanza.utils.training import common
  from stanza.utils.training.common import Mode, add_charlm_args, build_charlm_args, choose_charlm, find_wordvec_pretrain
  from stanza.resources.default_packages import default_charlms, default_pretrains, ner_charlms, ner_pretrains
label_desc: Use image node_id 2 for calling a global function with example usage: build_pretrain_args(language, dataset, charlm, command_args, extra_args, model_dir) and returns: unknown