<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_grp2codes(self):
 """Get dict of group name to namedtuples."""

        grp2codes = cx.defaultdict(set)
        for code, ntd in self.code2nt.items():
            grp2codes[ntd.group].add(code)
        return dict(grp2codes)