<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _init_grps(code2nt):
 """Return list of groups in same order as in code2nt"""

        seen = set()
        seen_add = seen.add
        groups = [nt.group for nt in code2nt.values()]
        return [g for g in groups if not (g in seen or seen_add(g))]