would ```defn.pop('attributes')``` not do the trick?