Nancy Pelosi is getting slammed for working with Trump — but it's actually a very smart plan