code: def correct(word, known_words):
      
      NWORDS = _train(known_words)
      candidates = _known([word], NWORDS) or _known(_edits1(word), NWORDS) or _known_edits2(word, NWORDS) or [word]
      return max(candidates, key=NWORDS.get)
docs: :param word: Word to correct
      :type word: string
      :param known_words: List of known words
      :type known_words: iterable of strings
  
      Given **word**, suggests a correction from **known_words**. If no reasonably close correction is found, returns
      **word**.