code: def test_gather_pre_entities(self):
      model_name = "sshleifer/tiny-dbmdz-bert-large-cased-finetuned-conll03-english"
      tokenizer = AutoTokenizer.from_pretrained(
          model_name, use_fast=True
      )
      token_classifier = pipeline(
          task="ner",
          model=model_name,
          tokenizer=tokenizer,
          framework="pt",
      )
  
      sentence = "Hello there"
  
      tokens = tokenizer(
          sentence,
          return_attention_mask=False,
          return_tensors="pt",
          truncation=True,
          return_special_tokens_mask=True,
          return_offsets_mapping=True,
      )
      offset_mapping = tokens.pop("offset_mapping").cpu().numpy()[0]
      special_tokens_mask = (
          tokens.pop("special_tokens_mask").cpu().numpy()[0]
      )
      input_ids = tokens["input_ids"].numpy()[0]
      # First element in [CLS]
      scores = np.array([[1, 0, 0], [0.1, 0.3, 0.6], [0.8, 0.1, 0.1]])
  
      pre_entities = token_classifier.gather_pre_entities(
          sentence,
          input_ids,
          scores,
          offset_mapping,
          special_tokens_mask,
          aggregation_strategy=AggregationStrategy.NONE,
      )
      self.assertEqual(
          nested_simplify(pre_entities),
          [
              {
                  "word": "Hello",
                  "scores": [0.1, 0.3, 0.6],
                  "start": 0,
                  "end": 5,
                  "is_subword": False,
                  "index": 1,
              },
              {
                  "word": "there",
                  "scores": [0.8, 0.1, 0.1],
                  "index": 2,
                  "start": 6,
                  "end": 11,
                  "is_subword": False,
              },
          ],
      )
  
imports: import unittest
  import numpy
  from transformers import MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING, TF_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING, AutoModelForTokenClassification, AutoTokenizer, TokenClassificationPipeline, pipeline
  from transformers.pipelines import AggregationStrategy, TokenClassificationArgumentHandler
  from transformers.testing_utils import is_pipeline_test, nested_simplify, require_tf, require_torch, require_torch_accelerator, slow, torch_device
  from .test_pipelines_common import ANY
label_desc: Use image node_id 14 for calling the TokenClassificationPipelineTests obj's underlying member method code with example usage: obj.test_gather_pre_entities() without return types