code: def test_get_padding_lengths_raises_if_no_indexed_tokens(self):
      field = TextField(
          [Token(t) for t in ["This", "is", "a", "sentence", "."]],
          token_indexers={"words": SingleIdTokenIndexer("words")},
      )
      with pytest.raises(ConfigurationError):
          field.get_padding_lengths()
  
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 4 for calling the TestTextField obj's underlying member method code with example usage: obj.test_get_padding_lengths_raises_if_no_indexed_tokens() without return types