code: def test_dbmdz_english(self):
      # Other sentence
      NER_MODEL = "dbmdz/bert-large-cased-finetuned-conll03-english"
      model = AutoModelForTokenClassification.from_pretrained(NER_MODEL)
      tokenizer = AutoTokenizer.from_pretrained(
          NER_MODEL, use_fast=True
      )
      sentence = """Enzo works at the UN"""
      token_classifier = pipeline(
          "ner", model=model, tokenizer=tokenizer
      )
      output = token_classifier(sentence)
      self.assertEqual(
          nested_simplify(output),
          [
              {
                  "entity": "I-PER",
                  "score": 0.998,
                  "word": "En",
                  "start": 0,
                  "end": 2,
                  "index": 1,
              },
              {
                  "entity": "I-PER",
                  "score": 0.997,
                  "word": "##zo",
                  "start": 2,
                  "end": 4,
                  "index": 2,
              },
              {
                  "entity": "I-ORG",
                  "score": 0.999,
                  "word": "UN",
                  "start": 18,
                  "end": 20,
                  "index": 6,
              },
          ],
      )
  
      token_classifier = pipeline(
          "ner",
          model=model,
          tokenizer=tokenizer,
          aggregation_strategy="simple",
      )
      output = token_classifier(sentence)
      self.assertEqual(
          nested_simplify(output),
          [
              {
                  "entity_group": "PER",
                  "score": 0.997,
                  "word": "Enzo",
                  "start": 0,
                  "end": 4,
              },
              {
                  "entity_group": "ORG",
                  "score": 0.999,
                  "word": "UN",
                  "start": 18,
                  "end": 20,
              },
          ],
      )
  
      token_classifier = pipeline(
          "ner",
          model=model,
          tokenizer=tokenizer,
          aggregation_strategy="first",
      )
      output = token_classifier(sentence)
      self.assertEqual(
          nested_simplify(output[:3]),
          [
              {
                  "entity_group": "PER",
                  "score": 0.998,
                  "word": "Enzo",
                  "start": 0,
                  "end": 4,
              },
              {
                  "entity_group": "ORG",
                  "score": 0.999,
                  "word": "UN",
                  "start": 18,
                  "end": 20,
              },
          ],
      )
  
      token_classifier = pipeline(
          "ner",
          model=model,
          tokenizer=tokenizer,
          aggregation_strategy="max",
      )
      output = token_classifier(sentence)
      self.assertEqual(
          nested_simplify(output[:3]),
          [
              {
                  "entity_group": "PER",
                  "score": 0.998,
                  "word": "Enzo",
                  "start": 0,
                  "end": 4,
              },
              {
                  "entity_group": "ORG",
                  "score": 0.999,
                  "word": "UN",
                  "start": 18,
                  "end": 20,
              },
          ],
      )
  
      token_classifier = pipeline(
          "ner",
          model=model,
          tokenizer=tokenizer,
          aggregation_strategy="average",
      )
      output = token_classifier(sentence)
      self.assertEqual(
          nested_simplify(output),
          [
              {
                  "entity_group": "PER",
                  "score": 0.997,
                  "word": "Enzo",
                  "start": 0,
                  "end": 4,
              },
              {
                  "entity_group": "ORG",
                  "score": 0.999,
                  "word": "UN",
                  "start": 18,
                  "end": 20,
              },
          ],
      )
  
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 8 for calling the TokenClassificationPipelineTests obj's underlying member method code with example usage: obj.test_dbmdz_english() without return types