class_docstr: A stub TokenIndexer that returns multiple arrays of different lengths.
class_docstr_tok: ["A","stub","TokenIndexer","that","returns","multiple","arrays","of","different","lengths","."]
code: def tokens_to_indices(
      self, tokens, vocabulary, index_name
  ):  # pylint: disable=unused-argument
      return {
          "token_ids": [10, 15]
          + [
              vocabulary.get_token_index(token.text, "words")
              for token in tokens
          ]
          + [25],
          "additional_key": [22, 29],
      }
  
imports: from __future__ import with_statement
  from __future__ import absolute_import
  from __future__ import print_function
  from collections import defaultdict
  import pytest
  import numpy
  from allennlp.data import Token, Vocabulary
  from allennlp.data.fields import TextField
  from allennlp.data.token_indexers import SingleIdTokenIndexer, TokenCharactersIndexer, TokenIndexer
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.util import pad_sequence_to_length
label_desc: Use image node_id 2 for calling the DictReturningTokenIndexer obj's underlying member method code with example usage: obj.tokens_to_indices(tokens, vocabulary, index_name) and returns: dict