homo- or copolymers derived from unsaturated compounds containing amide and/or imide groups