docs: def _findProteinClusters(protToPeps, pepToProts):
      """Find protein clusters in the specified protein to peptide mappings.
  
      A protein cluster is a group of proteins that are somehow directly or
      indirectly connected by shared peptides.
  
      :param protToPeps: dict, for each protein (=key) contains a set of
          associated peptides (=value). For Example {protein: {peptide, ...}, ...}
      :param pepToProts: dict, for each peptide (=key) contains a set of parent
          proteins (=value). For Example {peptide: {protein, ...}, ...}
      :returns: a list of protein clusters, each cluster is a set of proteins
      """
      clusters = list()
      resolvingProteins = set(protToPeps)
      while resolvingProteins:
          protein = resolvingProteins.pop()
          proteinCluster = set([protein])
  
          peptides = set(protToPeps[protein])
          parsedPeptides = set()
  
          while len(peptides) != len(parsedPeptides):
              for peptide in peptides:
                  proteinCluster.update(pepToProts[peptide])
              parsedPeptides.update(peptides)
  
              for protein in proteinCluster:
                  peptides.update(protToPeps[protein])
          clusters.append(proteinCluster)
          resolvingProteins = resolvingProteins.difference(proteinCluster)
      return clusters