The Polymorph spell says:
The new form can be any beast whose challenge rating is equal to or less than the target's
Swarm of insects says:
Medium swarm of Tiny beasts
Can a wizard choose the form of a swarm with Polymorph, considering that even though its made up of many creatures it is treated as a single creature with one attack?