code: def vector_cosine(vecs1, vecs2):
      """Cosine of angle between two (sets of) vectors
  
      The cosine of the angle between two vectors ``v1`` and ``v2`` is
      given by the inner product of ``v1`` and ``v2`` divided by the
      product of the vector lengths::
  
         v_cos = np.inner(v1, v2) / (np.sqrt(np.sum(v1**2)) *
                                     np.sqrt(np.sum(v2**2)))
  
      Parameters
      ----------
      vecs1 : (N, R) or (R,) array_like
         N vectors (as rows) or single vector.  Vectors have R elements.
      vecs1 : (N, R) or (R,) array_like
         N vectors (as rows) or single vector.  Vectors have R elements.
         It should be possible to broadcast `vecs1` against `vecs2`
  
      Returns
      -------
      vcos : (N,) or (0,) array
         Vector cosines.  To get the angles you will need ``np.arccos``
  
      Notes
      -----
      The vector cosine will be the same as the correlation only if all
      the input vectors have zero mean.
  
      """
      vecs1 = np.asarray(vecs1)
      vecs2 = np.asarray(vecs2)
      lens1 = np.sqrt(np.sum(vecs1**2, axis=-1))
      lens2 = np.sqrt(np.sum(vecs2**2, axis=-1))
      dots = np.inner(vecs1, vecs2)
      lens = lens1 * lens2
      return dots / lens
  
imports: import itertools
  import math
  import numpy
  import numpy.linalg
label_desc: Use image node_id 10 for calling a global function with example usage: vector_cosine(vecs1, vecs2) and returns: unknown