Define an ODE which depends on an external function with the @ode_def macro

This is a duplicate of another thread which has the answer: