<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fixup(p, data_bits, ptr_bits, bits_set):
 """ Flip back the pointer qubits that were previously flipped indicated by the flags `bits_set`. """

    for i in range(ptr_bits):
        if 0 != bits_set & (1 << i):
            p.inst(X(data_bits + i))