Anagram groups

Two words are anagrams if they use exactly the same letters. Write anagram_groups(words) that groups the words into lists of anagrams, with each group in original order, and the groups sorted by their first word.

anagram_groups(["tea", "eat", "tan", "ate", "nat", "bat"])  ->  [["bat"], ["tan", "nat"], ["tea", "eat", "ate"]]
def anagram_groups(words):
    ...