According to your suggestions, I've removed that whole function and instead calling _clip_norms from apply_constraints depending on whether updates are specified or not.