code: def test_th_tokenizer_serialize(th_tokenizer):
      tokenizer_bytes = th_tokenizer.to_bytes()
      nlp = Thai()
      nlp.tokenizer.from_bytes(tokenizer_bytes)
      assert tokenizer_bytes == nlp.tokenizer.to_bytes()
  
      with make_tempdir() as d:
          file_path = d / "tokenizer"
          th_tokenizer.to_disk(file_path)
          nlp = Thai()
          nlp.tokenizer.from_disk(file_path)
          assert tokenizer_bytes == nlp.tokenizer.to_bytes()
  
imports: import pickle
  from spacy.lang.th import Thai
  from ...util import make_tempdir
label_desc: Use image node_id 1 for calling a global function with example usage: test_th_tokenizer_serialize(th_tokenizer) without return types