How to install win 7 on imac 5k (2017)
iMac (Retina 5K, 27-inch, 2017), macOS Sierra (10.12.5)
iMac (Retina 5K, 27-inch, 2017), macOS Sierra (10.12.5)
Sadly you are not able to install Windows 7 on any iMac later than the 'late 2014' model. Check here for more details.
Microsoft has also sent out updates for Windows 7 and 8 — that disables further Windows updates when running on an Intel Kaby Lake processor. Even if you could install Windows 7 either in Boot Camp, or a Virtual Machine, Windows is specifically able to see that underlying Kaby Lake processor, and that would be the end of your updates.
FWIW you can run Windows 7 as a virtual machine in VMWare, Parallels or VirtualBox.
How to install win 7 on imac 5k (2017)