code: def build_charlm_args(
      language, charlm, base_args=True, model_dir=DEFAULT_MODEL_DIR
  ):
      """
      If specified, return forward and backward charlm args
      """
      if charlm:
          try:
              forward = find_charlm_file(
                  "forward", language, charlm, model_dir=model_dir
              )
              backward = find_charlm_file(
                  "backward", language, charlm, model_dir=model_dir
              )
          except FileNotFoundError as e:
              # if we couldn't find sd_isra when training an SD model,
              # for example, but isra exists, we try to download the
              # shorter model name
              if charlm.startswith(language + "_"):
                  short_charlm = charlm[len(language) + 1 :]
                  try:
                      forward = find_charlm_file(
                          "forward",
                          language,
                          short_charlm,
                          model_dir=model_dir,
                      )
                      backward = find_charlm_file(
                          "backward",
                          language,
                          short_charlm,
                          model_dir=model_dir,
                      )
                  except FileNotFoundError as e2:
                      raise FileNotFoundError(
                          "Tried to find charlm %s, which doesn't exist.  Also tried %s, but didn't find that either"
                          % (charlm, short_charlm)
                      ) from e
                  logger.warning(
                      "Was asked to find charlm %s, which does not exist.  Did find %s though",
                      charlm,
                      short_charlm,
                  )
              else:
                  raise
  
          char_args = [
              "--charlm_forward_file",
              forward,
              "--charlm_backward_file",
              backward,
          ]
          if not base_args:
              return char_args
          return [
              "--charlm",
              "--charlm_shorthand",
              f"{language}_{charlm}",
          ] + char_args
  
      return []
  
imports: import argparse
  import glob
  import logging
  import os
  import pathlib
  import sys
  import tempfile
  from enum import Enum
  from stanza.resources.default_packages import default_charlms, lemma_charlms, pos_charlms, depparse_charlms, TRANSFORMERS, TRANSFORMER_LAYERS
  from stanza.models.common.constant import treebank_to_short_name
  from stanza.models.common.utils import ud_scores
  from stanza.resources.common import download, DEFAULT_MODEL_DIR, UnknownLanguageError
  from stanza.utils.datasets import common
  import stanza.utils.default_paths
  from stanza.utils import conll18_ud_eval
label_desc: Use image node_id 11 for calling a global function with example usage: build_charlm_args(language, charlm, base_args, model_dir) and returns: list, unknown, char_args