docstr: Calculate the cosine similarity between two vectors.
          
docstr_tok: ["Calculate","the","cosine","similarity","between","two","vectors","."]
code: def cosine_similarity(self, vec1, vec2):
      """Calculate the cosine similarity between two vectors."""
      norm1 = self.l2_norm(vec1)
      norm2 = self.l2_norm(vec2)
      result = np.sum(vec1 * vec2) / norm1 / norm2
      return result
  
file_path: PaddleHub/modules/text/language_model/lda_news/semantic_matching.py
imports: import numpy
  from lda_news.vocab import OOV
label_desc: Use image node_id 3 for calling the SemanticMatching obj's underlying member method code with example usage: obj.cosine_similarity(vec1, vec2) and returns: result