old_contents: from _keyboard import Keyboard
  import Levenshtein as lv
  
  kb = Keyboard(u'US')
  def distance(w1, w2):
      # print kb.print_keyseq(kb.word_to_keyseq(unicode(w1))),
      # print kb.print_keyseq(kb.word_to_keyseq(unicode(w2)))
      return lv.distance(
          kb.word_to_keyseq(unicode(w1)),
          kb.word_to_keyseq(unicode(w2))
      )
  
  
  __all__ = [
      Keyboard,
      distance
  ]
  
new_contents: from _keyboard import Keyboard
  kb = Keyboard(u'US')
  
  try:
      from pyxdameraulevenshtein import \
          normalized_damerau_levenshtein_distance as _distance
  except ImportError:
      import Levenshtein.distance as _distance
  
  def distance(w1, w2):
      """
      Computes the edit (DL edit) distance between two strings @s1 and @s2.
      Edits are: [insert, delete, replace, transpose]
      """
      return _distance(
          kb.word_to_keyseq(unicode(w1)),
          kb.word_to_keyseq(unicode(w2))
      )
  
  
  __all__ = [
      Keyboard,
      distance
  ]
  
subject: transpose distance