code: def test_minkowski_metric_validate_weights_size():
      w2 = rng.random_sample(d + 1)
      dm = DistanceMetric.get_metric("minkowski", p=3, w=w2)
      msg = (
          "MinkowskiDistance: the size of w must match "
          f"the number of features \\({X64.shape[1]}\\). "
          f"Currently len\\(w\\)={w2.shape[0]}."
      )
      with pytest.raises(ValueError, match=msg):
          dm.pairwise(X64, Y64)
  
imports: import copy
  import itertools
  import pickle
  import numpy
  import pytest
  from scipy.spatial.distance import cdist
  from sklearn.metrics import DistanceMetric
  from sklearn.metrics._dist_metrics import BOOL_METRICS, DistanceMetric32, DistanceMetric64
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_allclose, create_memmap_backed_data
  from sklearn.utils.fixes import CSR_CONTAINERS, parse_version, sp_version
label_desc: Use image node_id 14 for calling a global function with example usage: test_minkowski_metric_validate_weights_size() without return types