code: def test_model_raises_error_not_exist(model_name, msg):
      """It should throw a direct error when a bad model setting goes in."""
      with pytest.raises(InvalidModelError) as err:
          create_spacy_nlp_component(model_name)
      assert msg in str(err.value)
  
file_path: rasa/tests/nlu/test_spacy_utils.py
imports: from typing import Optional, Text
  import pytest
  import spacy.tokens.doc
  from rasa.nlu.constants import DENSE_FEATURIZABLE_ATTRIBUTES, SPACY_DOCS
  from rasa.nlu.model import InvalidModelError
  from rasa.nlu.utils.spacy_utils import SpacyNLP, SpacyModel
  from rasa.shared.importers.importer import TrainingDataImporter
  from rasa.shared.nlu.constants import ACTION_TEXT, RESPONSE, TEXT
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 2 for calling a global function with example usage: test_model_raises_error_not_exist(model_name, msg) without return types