Formation of hollow ion beams of various shapes using multipole magnets