def _get_gate_span(qregs, instruction):
min_index = len(qregs)<EOL>max_index = <NUM_LIT:0><EOL>for qreg in instruction.qargs:<EOL><INDENT>index = qregs.index(qreg)<EOL>if index < min_index:<EOL><INDENT>min_index = index<EOL><DEDENT>if index > max_index:<EOL><INDENT>max_index = index<EOL><DEDENT><DEDENT>if instruction.cargs:<EOL><INDENT>return qregs[min_index:]<EOL><DEDENT>return qregs[min_index:max_index + <NUM_LIT:1>]<EOL>
Get the list of qubits drawing this gate would cover