Programmable flexible self-assembled micro/nano gratings: from fabrication strategies to tunable photonic functions | Synapse