code: def split_by_connected_component(self, idents):
          '''Split idents into equivalence classes based on connected
          components.
          '''
          idents_remaining = set(idents)
          connected_components = []
          for ident in idents:
              if ident not in idents_remaining:
                  continue
  
              idents_remaining.remove(ident)
  
              connected_component = [ident]
              for label in self.connected_component(ident):
                  cids = label.content_id1, label.content_id2
                  for cid in cids:
                      if cid in idents_remaining:
                          connected_component.append(cid)
                          idents_remaining.remove(cid)
  
              connected_components.append(sorted(connected_component))
          return connected_componentf split_by_connected_component(self, idents):
          '''Split idents into equivalence classes based on connected
          components.
          '''
          idents_remaining = set(idents)
          connected_components = []
          for ident in idents:
              if ident not in idents_remaining:
                  continue
  
              idents_remaining.remove(ident)
  
              connected_component = [ident]
              for label in self.connected_component(ident):
                  cids = label.content_id1, label.content_id2
                  for cid in cids:
                      if cid in idents_remaining:
                          connected_component.append(cid)
                          idents_remaining.remove(cid)
  
              connected_components.append(sorted(connected_component))
          return connected_components
docs: Split idents into equivalence classes based on connected
          components.