code: def test_count_vocab_items_uses_pos_tags(self):
      tokens = self.tokenizer.split_words("This is a sentence.")
      tokens = [Token("<S>")] + [t for t in tokens] + [Token("</S>")]
      indexer = DepLabelIndexer()
      counter = defaultdict(lambda: defaultdict(int))
      for token in tokens:
          indexer.count_vocab_items(token, counter)
  
      assert counter["dep_labels"] == {
          "ROOT": 1,
          "nsubj": 1,
          "det": 1,
          "NONE": 2,
          "attr": 1,
          "punct": 1,
      }
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/data/token_indexers/dep_label_indexer_test.py
imports: from __future__ import absolute_import
  from collections import defaultdict
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import Token, Vocabulary
  from allennlp.data.token_indexers import DepLabelIndexer
  from allennlp.data.tokenizers.word_splitter import SpacyWordSplitter
label_desc: Use image node_id 2 for calling the TestDepLabelIndexer obj's underlying member method code with example usage: obj.test_count_vocab_items_uses_pos_tags() without return types