code: def test_initialized_transformer_todisk():
      nlp = Language()
      trf = nlp.add_pipe("transformer", config=DEFAULT_CONFIG)
      nlp.initialize()
      with make_tempdir() as d:
          trf.to_disk(d)
          nlp2 = Language()
          trf2 = nlp2.add_pipe("transformer", config=DEFAULT_CONFIG)
          trf2.from_disk(d)
  
          assert trf2.model.tokenizer.is_fast is False
  
      fast_config = copy.deepcopy(DEFAULT_CONFIG)
      fast_config["model"]["tokenizer_config"]["use_fast"] = True
      nlp = Language()
      trf = nlp.add_pipe("transformer", config=fast_config)
      nlp.initialize()
      with make_tempdir() as d:
          trf.to_disk(d)
          nlp2 = Language()
          trf2 = nlp2.add_pipe("transformer", config=fast_config)
          trf2.from_disk(d)
  
          assert trf2.model.tokenizer.is_fast is True
  
imports: import pytest
  import copy
  import spacy
  from spacy import Language
  from spacy.lang.en import English
  from spacy.tests.util import assert_docs_equal
  from spacy.tokens import Doc
  from spacy.util import make_tempdir
  from spacy import util
  import srsly
  from thinc.api import Config, get_current_ops
  from numpy.testing import assert_array_equal
  from ..None import TransformerData
label_desc: Use image node_id 4 for calling a global function with example usage: test_initialized_transformer_todisk() without return types