docstr: Test that saving and reloading doesn't change the vocab.
  
  Note that this test reads and writes to the filesystem, which necessitates
  that this test size be "large".
docstr_tok: ["Test","that","saving","and","reloading","does","n't","change","the","vocab",".","Note","that","this","test","reads","and","writes","to","the","filesystem",",","which","necessitates","that","this","test","size","be","``","large","''","."]
code: def test_save_and_reload(self):
      """Test that saving and reloading doesn't change the vocab.
  
      Note that this test reads and writes to the filesystem, which necessitates
      that this test size be "large".
      """
  
      corpus = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
      vocab_filename = os.path.join(self.test_temp_dir, "abc.vocab")
  
      # Make text encoder from a list and store vocab to fake filesystem.
      encoder = text_encoder.TokenTextEncoder(
          None, vocab_list=corpus.split()
      )
      encoder.store_to_file(vocab_filename)
  
      # Load back the saved vocab file from the fake_filesystem.
      new_encoder = text_encoder.TokenTextEncoder(vocab_filename)
  
      self.assertEqual(encoder._id_to_token, new_encoder._id_to_token)
      self.assertEqual(encoder._token_to_id, new_encoder._token_to_id)
  
imports: import collections
  import io
  import os
  import random
  import shutil
  import string
  import mock
  from six.moves import range
  import tensorflow.compat.v1
  from trax.data import text_encoder
label_desc: Use image node_id 2 for calling the TokenTextEncoderTest obj's underlying member method code with example usage: obj.test_save_and_reload() without return types