code: def test_tokenizer_serde_fitting():
      sample_texts = [
          "There was a time that the pieces fit, but I watched them fall away",
          "Mildewed and smoldering, strangled by our coveting",
          "I've done the math enough to know the dangers of our second guessing",
      ]
      tokenizer = text.Tokenizer(num_words=100)
      tokenizer.fit_on_texts(sample_texts)
  
      seq_generator = tokenizer.texts_to_sequences_generator(
          sample_texts
      )
      sequences = [seq for seq in seq_generator]
      tokenizer.fit_on_sequences(sequences)
  
      tokenizer_json = tokenizer.to_json()
      recovered = text.tokenizer_from_json(tokenizer_json)
  
      assert tokenizer.char_level == recovered.char_level
      assert tokenizer.document_count == recovered.document_count
      assert tokenizer.filters == recovered.filters
      assert tokenizer.lower == recovered.lower
      assert tokenizer.num_words == recovered.num_words
      assert tokenizer.oov_token == recovered.oov_token
  
      assert tokenizer.word_docs == recovered.word_docs
      assert tokenizer.word_counts == recovered.word_counts
      assert tokenizer.word_index == recovered.word_index
      assert tokenizer.index_word == recovered.index_word
      assert tokenizer.index_docs == recovered.index_docs
  
imports: from collections import OrderedDict
  import numpy
  import pytest
  from tensorflow import keras
  from keras_preprocessing import text
label_desc: Use image node_id 6 for calling a global function with example usage: test_tokenizer_serde_fitting() without return types