In class derived_var, save its id in attributes of the output of the derive()
method - useful for generating plot labels later on.
fix bad import lines