code: def w2v_similarity(word_a, word_b, model):
      """
  
      Args:
          word_a(str):   input word a
          word_b(str):   input word b (can be phrase)
          model(gensim.models.Word2Vec): w2v model
  
      Returns:
          float: similarity, cosine similarity between 2 words
  
      """
      try:
          similarity = model.similarity(word_a, word_b)
          return similarity
      except ValueError:
          return -1
      except IndexError:
          return -1
      except KeyError:
          return -1
  
file_path: nlp-architect/examples/most_common_word_sense/feature_extraction.py
imports: import re
  import nltk
  import numpy
  from numpy import dot
  from numpy.linalg import norm
  from nlp_architect.utils.generic import license_prompt
label_desc: Use image node_id 9 for calling a global function with example usage: w2v_similarity(word_a, word_b, model) and returns: similarity, unknown, unknown, unknown