If the "plug-tail" is installed as part of the required switched light in a room, does the rest of the device need to be installed prior to the final by a licensed professional or can it be installed by a homeowner?

I like them, but I expect they are too expensive.