code: def test_parameter_check_word_extractor(params, error, err_msg):
      """Test parameter validation."""
      bow = WordExtractor(**params)
      with pytest.raises(error, match=re.escape(err_msg)):
          bow.transform(X_word)
  
imports: import numpy
  import pytest
  import re
  from pyts.bag_of_words import BagOfWords, WordExtractor
label_desc: Use image node_id 1 for calling a global function with example usage: test_parameter_check_word_extractor(params, error, err_msg) without return types