code: def _set_up_model(self, config, pipeline, device):
      try:
          from stanza.models.coref.model import CorefModel
      except ImportError:
          raise ImportError(
              "Please install the transformers and peft libraries before using coref! Try `pip install -e .[transformers]`."
          )
  
      # set up model
      # currently, the model has everything packaged in it
      # (except its config)
      # TODO: separate any pretrains if possible
      # TODO: add device parameter to the load mechanism
      config_update = {"log_norms": False, "device": device}
      model = CorefModel.load_model(
          path=config["model_path"],
          ignore={
              "bert_optimizer",
              "general_optimizer",
              "bert_scheduler",
              "general_scheduler",
          },
          config_update=config_update,
      )
      if config.get("batch_size", None):
          model.config.a_scoring_batch_size = int(config["batch_size"])
      model.training = False
  
      self._model = model
  
file_path: stanza/stanza/pipeline/coref_processor.py
imports: from stanza.models.common.utils import misc_to_space_after
  from stanza.models.coref.coref_chain import CorefMention, CorefChain
  from stanza.pipeline._constants import *
  from stanza.pipeline.processor import UDProcessor, register_processor
label_desc: Use image node_id 1 for calling the CorefProcessor obj's underlying member method code with example usage: obj._set_up_model(config, pipeline, device) without return types