input: Write a python function to generate all anagrams of a given word and return them in sorted order.
  assert getAnagrams('word') == ['dorw', 'dowr', 'droW', 'drWo', 'drwO', 'dwor', 'dwro', 'odrw', 'odwr', 'ordW', 'orWd', 'orwD', 'owrd', 'owdr', 'rdow', 'rdwo', 'rodW', 'roWd', 'rowD', 'rwdo', 'rwod', 'wodr', 'word', 'wrod', 'wrdo']
  assert getAnagrams('abc') == ['abc', 'acb', 'bac', 'bca', 'cab', 'cba']
  assert getAnagrams('a') == ['a']
output: def getAnagrams(word):
      from itertools import permutations
      anagrams = set(''.join(p) for p in permutations(word))
      return sorted(anagrams)