Write a function to find all group anagrams from a given list of strings. Implement group_anagrams(strs), returning a list of groups where each group contains strings that are anagrams. Preserve the order in which groups are first encountered and preserve the original order of strings within each group. Return an empty list for empty input.
def group_anagrams(strs):