docs: def _sequence_search(self, start: GridQubit,
                           current: List[GridQubit]) -> List[GridQubit]:
          """Search for the continuous linear sequence from the given qubit.
  
          This method is called twice for the same starting qubit, so that
          sequences that begin and end on this qubit are searched for.
  
          Args:
              start: The first qubit, where search should be trigerred from.
              current: Previously found linear sequence, which qubits are
                       forbidden to use during the search.
  
          Returns:
              Continuous linear sequence that begins with the starting qubit and
              does not contain any qubits from the current list.
          """
          used = set(current)
          seq = []
          n = start  # type: Optional[GridQubit]
          while n is not None:
              # Append qubit n to the sequence and mark it is as visited.
              seq.append(n)
              used.add(n)
              # Advance search to the next qubit.
              n = self._choose_next_qubit(n, used)
          return seq