There are two ways. I only know people who have done it the easy way.
Easy way: get a tuner that can get it to pass electronically, and tip the tech doing the inspection.
Hard way: in theory, if you have every piece of paperwork relating to the donor car, you can get the DMV to allow it if the host car is older than the engine from the same manufacturer. I've never heard of anybody getting this done, and it will probably be more time wasted than it is worth.
Just get the right tuner, and pray the state never catches on.