<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _perm_dict_from_subj_dict(self, subj_dict):
 """Return dict where keys and values of ``subj_dict`` have been flipped around."""

        perm_dict = {}
        for subj_str, perm_set in list(subj_dict.items()):
            for perm_str in perm_set:
                perm_dict.setdefault(perm_str, set()).add(subj_str)
        return perm_dict