code: def _contains_line(self, line):
          
          return all(v in self for v in line) and all(u in self[v] for u, v in zip(line, line[1::]))
docs: Test if a chain of qubits is completely contained in ``self``.  In
          particular, test if all qubits are present and the couplers
          connecting those qubits are also connected.
  
          NOTE: this function assumes that ``line`` is a list or tuple of
          qubits which satisfies the precondition that ``(line[i],line[i+1])``
          is supposed to be a coupler for all ``i``.
  
          INPUTS:
              line: a list of qubits satisfying the above precondition
  
          OUTPUT:
              boolean