def METHOD_NAME(self):
    """Test that the conversion works when the given circuit has bits that are contained in more
    than one register."""
    qubits = [Qubit() for _ in [None] * 10]
    qr1 = QuantumRegister(bits=qubits[:6])
    qr2 = QuantumRegister(bits=qubits[4:])
    circ = QuantumCircuit(qubits, qr1, qr2)
    circ.cx(3, 5)
    gate = circ.to_gate()
    self.assertIsInstance(gate, Gate)
    self.assertEqual(gate.num_qubits, len(qubits))
    gate_definition = gate.definition
    cx = gate_definition.data[0]
    self.assertEqual(cx.qubits, (gate_definition.qubits[3], gate_definition.qubits[5]))
    self.assertEqual(cx.clbits, ())