code: def cosine_2(h1, h2):  # 19 us @array, 44 us @list \w 100 bins
      r"""
      Cosine simmilarity.
  
      Turns the cosine similarity into a distance measure for normalized, positive
      histograms.
  
      .. math::
  
          d_{\bar{\cos}}(H, H') = 1 - \frac{2*\arccos d_{\cos}(H, H')}{pi}
  
      See `cosine` for the definition of :math:`d_{\cos}(H, H')`.
  
      *Attributes:*
  
      - metric
  
      *Attributes for normalized histograms:*
  
      - :math:`d(H, H')\in[0, 1]`
      - :math:`d(H, H) = 0`
      - :math:`d(H, H') = d(H', H)`
  
      *Attributes for not-normalized histograms:*
  
      - not applicable
  
      *Attributes for not-equal histograms:*
  
      - not applicable
  
      Parameters
      ----------
      h1 : sequence
          The first histogram, normalized.
      h2 : sequence
          The second histogram, normalized, same bins as ``h1``.
  
          Returns
      -------
      cosine : float
          Cosine distance.
      """
      return 1.0 - (2 * cosine(h1, h2)) / math.pi
  
imports: import math
  import scipy
label_desc: Use image node_id 25 for calling a global function with example usage: cosine_2(h1, h2) and returns: unknown