def connect(self, f, t):
        """Connect two existing vertices.

        Nothing happens if the vertices are already connected.
        """
        if t not in self._vertices:
            raise KeyError(t)
        self._forwards[f].add(t)
        self._backwards[t].add(f)
Connect two existing vertices.

        Nothing happens if the vertices are already connected.
        
product/gradle-plugin/src/main/python/pip/_vendor/resolvelib/structs.py