code: def test_type_ids_when_folding(self):
      allennlp_tokenizer = PretrainedTransformerTokenizer(
          "bert-base-uncased", add_special_tokens=False
      )
      indexer = PretrainedTransformerIndexer(
          model_name="bert-base-uncased", max_length=6
      )
      first_string = "How do trees get online?"
      second_string = "They log in!"
  
      tokens = allennlp_tokenizer.add_special_tokens(
          allennlp_tokenizer.tokenize(first_string),
          allennlp_tokenizer.tokenize(second_string),
      )
      vocab = Vocabulary()
      indexed = indexer.tokens_to_indices(tokens, vocab)
      assert min(indexed["type_ids"]) == 0
      assert max(indexed["type_ids"]) == 1
  
imports: import pytest
  from allennlp.common import cached_transformers
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import Vocabulary
  from allennlp.data.token_indexers import PretrainedTransformerIndexer
  from allennlp.data.tokenizers import PretrainedTransformerTokenizer
label_desc: Use image node_id 10 for calling the TestPretrainedTransformerIndexer obj's underlying member method code with example usage: obj.test_type_ids_when_folding() without return types