code: def test_no_resize():
      nlp = Language()
      morphologizer = nlp.add_pipe("morphologizer")
      morphologizer.add_label("POS" + Morphology.FIELD_SEP + "NOUN")
      morphologizer.add_label("POS" + Morphology.FIELD_SEP + "VERB")
      nlp.initialize()
      # this throws an error because the morphologizer can't be resized after initialization
      with pytest.raises(ValueError):
          morphologizer.add_label("POS" + Morphology.FIELD_SEP + "ADJ")
  
file_path: spaCy/spacy/tests/pipeline/test_morphologizer.py
imports: import pytest
  from numpy.testing import assert_almost_equal, assert_equal
  from thinc.api import get_current_ops
  from spacy import util
  from spacy.attrs import MORPH
  from spacy.lang.en import English
  from spacy.language import Language
  from spacy.morphology import Morphology
  from spacy.tests.util import make_tempdir
  from spacy.tokens import Doc
  from spacy.training import Example
label_desc: Use image node_id 5 for calling a global function with example usage: test_no_resize() without return types