for i in range(10000000):
    m = randint(0, 65536)
i = randint(0, 15)
j = randint(i, 16)
n = randint(0, 2 ** (j - i))
if set_bits(m, n, i, j) != update_bits(m, n, i, j):
    print((bin(m), bin(n), i, j, bin(set_bits(m, n, i, j)), bin(update_bits
        (m, n, i, j))))
Given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set all bits between i and j in N equal to M