def extract_sequences() -> list[list[cirq.GridQubit]]:
            """Creates list of sequences for initial state.

            Returns:
              List of lists of sequences constructed on the chip.
            """
            seqs = []
            prev = None
            seq = []
            for node in self._c:
                if prev is None:
                    seq = [node]
                else:
                    if node in self._c_adj[prev]:
                        # Expand current sequence.
                        seq.append(node)
                    else:
                        # Create new sequence, there is no connection between
                        # nodes.
                        seqs.append(seq)
                        seq = [node]
                prev = node
            if seq:
                seqs.append(seq)
            return seqs
Creates list of sequences for initial state.

            Returns:
              List of lists of sequences constructed on the chip.
            
cirq-google/cirq_google/line/placement/anneal.py