code: def test_cosine_unmatched():
      vec1 = numpy.asarray([[1, 2, 3]])
      vec2 = numpy.asarray([[1, 2]])
      with pytest.raises(ValueError):
          CosineDistance().get_grad(vec1, vec2)
  
file_path: thinc/thinc/tests/test_loss.py
imports: import numpy
  import pytest
  from thinc import registry
  from thinc.api import CategoricalCrossentropy, CosineDistance, L2Distance, SequenceCategoricalCrossentropy
label_desc: Use image node_id 12 for calling a global function with example usage: test_cosine_unmatched() without return types