code: def synonyms(word2nums, num2words, word):
      """Uses the word2nums and num2words dicts to look up synonyms
      for the given word. Returns a list of synonym strings.
      """
  
      keys = word2nums[word]
      syns = set()
      for key in keys:
          syns = syns.union(num2words[key])
  
      if word in syns:
          syns.remove(word)
      return sorted(syns)
  
file_path: whoosh/src/whoosh/lang/wordnet.py
imports: from collections import defaultdict
  from whoosh.compat import iterkeys, text_type
  from whoosh.fields import Schema, ID, STORED
label_desc: Use image node_id 3 for calling a global function with example usage: synonyms(word2nums, num2words, word) and returns: sorted