code: def test_batch_tokenization(self):
      tokenizer = CharacterTokenizer()
      sentences = [
          "This is a sentence",
          "This isn't a sentence.",
          "This is the 3rd sentence." "Here's the 'fourth' sentence.",
      ]
      batch_tokenized = tokenizer.batch_tokenize(sentences)
      separately_tokenized = [
          tokenizer.tokenize(sentence) for sentence in sentences
      ]
      assert len(batch_tokenized) == len(separately_tokenized)
      for batch_sentence, separate_sentence in zip(
          batch_tokenized, separately_tokenized
      ):
          assert len(batch_sentence) == len(separate_sentence)
          for batch_word, separate_word in zip(
              batch_sentence, separate_sentence
          ):
              assert batch_word.text == separate_word.text
  
file_path: allennlp/tests/data/tokenizers/character_tokenizer_test.py
imports: from allennlp.common import Params
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data.tokenizers import CharacterTokenizer
label_desc: Use image node_id 2 for calling the TestCharacterTokenizer obj's underlying member method code with example usage: obj.test_batch_tokenization() without return types