code: def setUp(self):
      self.vocab = Vocabulary()
      self.vocab.add_token_to_namespace("this", "words")
      self.vocab.add_token_to_namespace("is", "words")
      self.vocab.add_token_to_namespace("a", "words")
      self.vocab.add_token_to_namespace("sentence", "words")
      self.vocab.add_token_to_namespace("s", "characters")
      self.vocab.add_token_to_namespace("e", "characters")
      self.vocab.add_token_to_namespace("n", "characters")
      self.vocab.add_token_to_namespace("t", "characters")
      self.vocab.add_token_to_namespace("c", "characters")
      for label in [
          "a",
          "b",
          "c",
          "d",
          "e",
          "f",
          "g",
          "h",
          "i",
          "j",
          "k",
      ]:
          self.vocab.add_token_to_namespace(label, "labels")
  
      self.word_indexer = {"words": SingleIdTokenIndexer("words")}
      self.words_and_characters_indexers = {
          "words": SingleIdTokenIndexer("words"),
          "characters": TokenCharactersIndexer("characters"),
      }
      self.field1 = TextField(
          [Token(t) for t in ["this", "is", "a", "sentence"]],
          self.word_indexer,
      )
      self.field2 = TextField(
          [
              Token(t)
              for t in ["this", "is", "a", "different", "sentence"]
          ],
          self.word_indexer,
      )
      self.field3 = TextField(
          [Token(t) for t in ["this", "is", "another", "sentence"]],
          self.word_indexer,
      )
  
      self.empty_text_field = self.field1.empty_field()
      self.index_field = IndexField(1, self.field1)
      self.empty_index_field = self.index_field.empty_field()
      self.sequence_label_field = SequenceLabelField(
          [1, 1, 0, 1], self.field1
      )
      self.empty_sequence_label_field = (
          self.sequence_label_field.empty_field()
      )
  
      super(TestListField, self).setUp()
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/data/fields/list_field_test.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  import numpy
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import Token, Vocabulary
  from allennlp.data.fields import TextField, LabelField, ListField, IndexField, SequenceLabelField
  from allennlp.data.token_indexers import SingleIdTokenIndexer, TokenCharactersIndexer
label_desc: Use image node_id 1 for calling the TestListField obj's underlying member method code with example usage: obj.setUp() without return types