code: def test_parameter_check(params, error, err_msg):
      """Test parameter validation."""
      paa = PiecewiseAggregateApproximation(**params)
      with pytest.raises(error, match=re.escape(err_msg)):
          paa.transform(X)
  
imports: import numpy
  import pytest
  import re
  from pyts.approximation.paa import _paa
  from pyts.approximation import PiecewiseAggregateApproximation
label_desc: Use image node_id 2 for calling a global function with example usage: test_parameter_check(params, error, err_msg) without return types