code: def find_charlm_file(
      direction, language, charlm, model_dir=DEFAULT_MODEL_DIR
  ):
      """
      Return the path to the forward or backward charlm if it exists for the given package
  
      If we can figure out the package, but can't find it anywhere, we try to download it
      """
      saved_path = "saved_models/charlm/{}_{}_{}_charlm.pt".format(
          language, charlm, direction
      )
      if os.path.exists(saved_path):
          logger.info(
              f"Using model {saved_path} for {direction} charlm"
          )
          return saved_path
  
      resource_path = "{}/{}/{}_charlm/{}.pt".format(
          model_dir, language, direction, charlm
      )
      if os.path.exists(resource_path):
          logger.info(
              f"Using model {resource_path} for {direction} charlm"
          )
          return resource_path
  
      try:
          download(
              lang=language,
              package=None,
              processors={f"{direction}_charlm": charlm},
              model_dir=model_dir,
          )
          if os.path.exists(resource_path):
              logger.info(
                  f"Downloaded model, using model {resource_path} for {direction} charlm"
              )
              return resource_path
      except ValueError as e:
          raise FileNotFoundError(
              f"Cannot find {direction} charlm in either {saved_path} or {resource_path}  Attempted downloading {charlm} but that did not work"
          ) from e
  
      raise FileNotFoundError(
          f"Cannot find {direction} charlm in either {saved_path} or {resource_path}  Attempted downloading {charlm} but that did not work"
      )
  
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 10 for calling a global function with example usage: find_charlm_file(direction, language, charlm, model_dir) and returns: saved_path, resource_path, resource_path