code: def test_forward_charlm(pretrain_file):
      """
      Tests loading and running a charlm
  
      Note that this doesn't test the results of the charlm itself,
      just that the model is shaped correctly
      """
      forward_charlm_path = os.path.join(
          TEST_MODELS_DIR, "en", "forward_charlm", "1billion.pt"
      )
      backward_charlm_path = os.path.join(
          TEST_MODELS_DIR, "en", "backward_charlm", "1billion.pt"
      )
      assert os.path.exists(
          forward_charlm_path
      ), "Need to download en test models (or update path to the forward charlm)"
      assert os.path.exists(
          backward_charlm_path
      ), "Need to download en test models (or update path to the backward charlm)"
  
      model = build_model(
          pretrain_file,
          "--charlm_forward_file",
          forward_charlm_path,
          "--charlm_backward_file",
          backward_charlm_path,
          "--sentence_boundary_vectors",
          "none",
      )
      run_forward_checks(model)
  
      model = build_model(
          pretrain_file,
          "--charlm_forward_file",
          forward_charlm_path,
          "--charlm_backward_file",
          backward_charlm_path,
          "--sentence_boundary_vectors",
          "words",
      )
      run_forward_checks(model)
  
imports: import os
  import pytest
  import torch
  from stanza.models.common import pretrain
  from stanza.models.common.utils import set_random_seed
  from stanza.models.constituency import parse_transitions
  from stanza.tests import *
  from stanza.tests.constituency import test_parse_transitions
  from stanza.tests.constituency.test_trainer import build_trainer
label_desc: Use image node_id 20 for calling a global function with example usage: test_forward_charlm(pretrain_file) without return types