code: def process(self, document):
      with torch.no_grad():
          all_preds = []
          for trainer, config in zip(self.trainers, self.configs):
              # set up a eval-only data loader and skip tag preprocessing
              batch = DataLoader(
                  document,
                  config["batch_size"],
                  config,
                  vocab=trainer.vocab,
                  evaluation=True,
                  preprocess_tags=False,
                  bert_tokenizer=trainer.model.bert_tokenizer,
              )
              preds = []
              for i, b in enumerate(batch):
                  preds += trainer.predict(b)
              all_preds.append(preds)
      # for each sentence, gather a list of predictions
      # merge those predictions into a single list
      # earlier models will have precedence
      preds = [merge_tags(*x) for x in zip(*all_preds)]
      batch.doc.set(
          [doc.NER], [y for x in preds for y in x], to_token=True
      )
      batch.doc.set(
          [doc.MULTI_NER],
          [tuple(y) for x in zip(*all_preds) for y in zip(*x)],
          to_token=True,
      )
      # collect entities into document attribute
      total = len(batch.doc.build_ents())
      logger.debug(f"{total} entities found in document.")
      return batch.doc
  
file_path: stanza/stanza/pipeline/ner_processor.py
imports: import torch
  import logging
  from stanza.models.common import doc
  from stanza.models.common.exceptions import ForwardCharlmNotFoundError, BackwardCharlmNotFoundError
  from stanza.models.common.utils import unsort
  from stanza.models.ner.data import DataLoader
  from stanza.models.ner.trainer import Trainer
  from stanza.models.ner.utils import merge_tags
  from stanza.pipeline._constants import *
  from stanza.pipeline.processor import UDProcessor, register_processor
label_desc: Use image node_id 6 for calling the NERProcessor obj's underlying member method code with example usage: obj.process(document) and returns: batch