code: def test_cosine_distance():
      a = np.reshape(np.arange(25.0, dtype=np.float32), (5, 5))
      b = np.reshape(np.arange(0, 5, dtype=np.float32), (1, 5))
  
      src = C.sequence.input_variable(
          shape=(5), sequence_axis=C.Axis("Seq")
      )
      tgt = C.input_variable(shape=(5))
      tgt_br = C.sequence.broadcast_as(tgt, src)
      cos_seq = C.cosine_distance(src, tgt_br)
      assert len(cos_seq.dynamic_axes) == 2
      assert cos_seq.dynamic_axes[1].name == "Seq"
      val = cos_seq.eval({src: [a], tgt: [b]})
      expected = [[1.0, 0.914659, 0.878459, 0.86155, 0.851852]]
      assert np.allclose(val, expected)
  
file_path: CNTK/bindings/python/cntk/losses/tests/cosine_distance_test.py
imports: import numpy
  import pytest
  import cntk
label_desc: Use image node_id 1 for calling a global function with example usage: test_cosine_distance() without return types