docs: 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