fig simulation of periods of oscillations by heun' method import odespy def (ut)return method odespy heun ore odespy forwardeuler solver method(fsolver set_initial_condition( time_points np linspace( ut solver solve(time_pointsin other wordsyou define your right-hand side function (ut)initialize an odespy solver objectset the initial conditioncompute collection of time points where you want the solutionand ask for the solution the returned arrays and can be plotted directlyplot(tua nice feature of odespy is that problem parameters can be arguments to the user' (utfunction for exampleif our ode problem is au bwith two problem parameters and bwe may write our function as def (utab)return - * the extraproblem-dependent arguments and can be transferred to this function if we collect their values in list or tuple when creating the odespy solver and use the f_args argument