Don't duplicate this logic. Use `real_imag` here.