code: def _set_up_model(self, config, pipeline, device):
      # set up model
      # pretrain and charlm paths are args from the config
      # bert (if used) will be chosen from the model save file
      args = {
          "wordvec_pretrain_file": config.get("pretrain_path", None),
          "charlm_forward_file": config.get(
              "forward_charlm_path", None
          ),
          "charlm_backward_file": config.get(
              "backward_charlm_path", None
          ),
          "device": device,
      }
      trainer = Trainer.load(
          filename=config["model_path"],
          args=args,
          foundation_cache=pipeline.foundation_cache,
      )
      self._model = trainer.model
      self._model.eval()
      # batch size counted as sentences
      self._batch_size = int(
          config.get(
              "batch_size", ConstituencyProcessor.DEFAULT_BATCH_SIZE
          )
      )
      self._tqdm = "tqdm" in config and config["tqdm"]
  
file_path: stanza/stanza/pipeline/constituency_processor.py
imports: from stanza.models.constituency.trainer import Trainer
  from stanza.models.common import doc
  from stanza.utils.get_tqdm import get_tqdm
  from stanza.pipeline._constants import *
  from stanza.pipeline.processor import UDProcessor, register_processor
label_desc: Use image node_id 2 for calling the ConstituencyProcessor obj's underlying member method code with example usage: obj._set_up_model(config, pipeline, device) without return types