code: def _expand_sequence(self, seq: List[GridQubit]) -> List[GridQubit]:
          
          i = 1
          while i < len(seq):
              path = self._find_path_between(seq[i - 1], seq[i], set(seq))
              if path:
                  seq = seq[:i] + path + seq[i:]
              else:
                  i += 1
          return seq
docs: Tries to expand given sequence with more qubits.
  
          Args:
              seq: Linear sequence of qubits.
  
          Returns:
              New continuous linear sequence which contains all the qubits from
              seq and possibly new qubits inserted in between.