code: def add_charlm_args(parser):
      """
      Extra args for the charlm: forward/backward
      """
      parser.add_argument(
          "--direction",
          default="forward",
          choices=["forward", "backward"],
          help="Forward or backward language model",
      )
      parser.add_argument(
          "--forward",
          action="store_const",
          dest="direction",
          const="forward",
          help="Train a forward language model",
      )
      parser.add_argument(
          "--backward",
          action="store_const",
          dest="direction",
          const="backward",
          help="Train a backward language model",
      )
  
file_path: stanza/stanza/utils/training/run_charlm.py
imports: import logging
  import os
  from stanza.models import charlm
  from stanza.utils.training import common
  from stanza.utils.training.common import Mode
label_desc: Use image node_id 1 for calling a global function with example usage: add_charlm_args(parser) without return types