`return int(np.log2(n) + 1)`?