code: def test_parameter_check_dtw(params, err_msg):
      """Test parameter validation."""
      with pytest.raises(ValueError, match=re.escape(err_msg)):
          dtw(x, y, **params)
  
imports: import numpy
  import pytest
  import re
  from math import sqrt
  from numba import njit
  from pyts.metrics.dtw import _square, _absolute, _check_input_dtw, _blurred_path_region, _return_path, _return_results, cost_matrix, accumulated_cost_matrix, _check_region, _dtw_classic, _dtw_region, _dtw_sakoechiba, _dtw_itakura, _dtw_multiscale, _dtw_fast
  from pyts.metrics import dtw, itakura_parallelogram, sakoe_chiba_band, show_options
label_desc: Use image node_id 25 for calling a global function with example usage: test_parameter_check_dtw(params, err_msg) without return types