<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_grps_n_codes(self, usr_set):
 """Get codes, given codes or groups."""

        codes = usr_set.intersection(self.code2nt)
        for grp in usr_set.intersection(self.grp2codes):
            codes.update(self.grp2codes[grp])
        return codes