class_docstr: This :class:`TokenIndexer` represents tokens by their entity type (i.e., their NER tag), as
  determined by the ``ent_type_`` field on ``Token``.
  
  Parameters
  ----------
  namespace : ``str``, optional (default=``ner_tags``)
      We will use this namespace in the :class:`Vocabulary` to map strings to indices.
code: def tokens_to_indices(self, tokens, vocabulary, index_name):
      tags = [
          "NONE" if token.ent_type_ is None else token.ent_type_
          for token in tokens
      ]
  
      return {
          index_name: [
              vocabulary.get_token_index(tag, self._namespace)
              for tag in tags
          ]
      }
  
file_path: magnitude/pymagnitude/third_party/allennlp/data/token_indexers/ner_tag_indexer.py
imports: from __future__ import absolute_import
  import logging
  from allennlp.common.util import pad_sequence_to_length
  from allennlp.data.vocabulary import Vocabulary
  from allennlp.data.tokenizers.token import Token
  from allennlp.data.token_indexers.token_indexer import TokenIndexer
label_desc: Use image node_id 3 for calling the NerTagIndexer obj's underlying member method code with example usage: obj.tokens_to_indices(tokens, vocabulary, index_name) and returns: dict