code: def _set_up_model(self, config, pipeline, device):
      # get pretrained word vectors
      pretrain_path = config.get("pretrain_path", None)
      forward_charlm_path = config.get("forward_charlm_path", None)
      backward_charlm_path = config.get("backward_charlm_path", None)
      # elmo does not have a convenient way to download intermediate
      # models the way stanza downloads charlms & pretrains or
      # transformers downloads bert etc
      # however, elmo in general is not as good as using a
      # transformer, so it is unlikely we will ever fix this
      args = SimpleNamespace(
          device=device,
          charlm_forward_file=forward_charlm_path,
          charlm_backward_file=backward_charlm_path,
          wordvec_pretrain_file=pretrain_path,
          elmo_model=None,
          use_elmo=False,
          save_dir=None,
      )
      filename = config["model_path"]
      if filename is None:
          raise FileNotFoundError(
              "No model specified for the sentiment processor.  Perhaps it is not supported for the language.  {}".format(
                  config
              )
          )
      # set up model
      trainer = Trainer.load(
          filename=filename,
          args=args,
          foundation_cache=pipeline.foundation_cache,
      )
      self._model = trainer.model
      self._model_type = self._model.config.model_type
      # batch size counted as words
      self._batch_size = config.get(
          "batch_size", SentimentProcessor.DEFAULT_BATCH_SIZE
      )
  
file_path: stanza/stanza/pipeline/sentiment_processor.py
imports: import torch
  from types import SimpleNamespace
  from stanza.models.classifiers.trainer import Trainer
  from stanza.pipeline._constants import *
  from stanza.pipeline.processor import UDProcessor, register_processor
label_desc: Use image node_id 1 for calling the SentimentProcessor obj's underlying member method code with example usage: obj._set_up_model(config, pipeline, device) without return types