code: def test_serialize_parser(parser_config_string):
      """Create a non-default parser config to check nlp serializes it correctly"""
      nlp = English()
      model_config = Config().from_str(parser_config_string)
      parser = nlp.add_pipe("parser", config=model_config)
      parser.add_label("nsubj")
      nlp.initialize()
  
      with make_tempdir() as d:
          nlp.to_disk(d)
          nlp2 = spacy.load(d)
          model = nlp2.get_pipe("parser").model
          model.get_ref("tok2vec")
          # check that we have the correct settings, not the default ones
          if model.attrs["has_upper"]:
              assert model.get_ref("upper").get_dim("nI") == 66
          assert model.get_ref("lower").get_dim("nI") == 66
  
imports: import pytest
  from catalogue import RegistryError
  from thinc.api import Config, ConfigValidationError
  import spacy
  from spacy.lang.de import German
  from spacy.lang.en import English
  from spacy.language import DEFAULT_CONFIG, DEFAULT_CONFIG_PRETRAIN_PATH, Language
  from spacy.ml.models import MaxoutWindowEncoder, MultiHashEmbed, build_tb_parser_model, build_Tok2Vec_model
  from spacy.schemas import ConfigSchema, ConfigSchemaPretrain
  from spacy.training import Example
  from spacy.util import load_config, load_config_from_str, load_model_from_config, registry
  from ..util import make_tempdir
label_desc: Use image node_id 8 for calling a global function with example usage: test_serialize_parser(parser_config_string) without return types