<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 The model defined in rbc_taxes.yaml is the rbc model, with an agregate tax g that is proportional to income.
Step1:  We want to compute the adjustment of the economy when this tax, goes back progressively from 10% to 0%, over 10 periods.
<ASSISTANT_TASK:>
Python Code:
model.calibration
model.residuals()
Explanation: The model defined in rbc_taxes.yaml is the rbc model, with an agregate tax g that is proportional to income.
End of explanation
exo_g = linspace(0.1,0,10) # this is a vector of size 10
exo_g = atleast_2d(exo_g).T # the solver expects a 1x10 vector
print(exo_g.shape)
exo_g
# Let's solve for the optimal adjustment by assuming that the
# economy returns to steady-state after T=50 periods.
from dolo.algos.perfect_foresight import deterministic_solve
sim = deterministic_solve(model, shocks=exo_g, T=50)
display(sim) # it returns a timeseries object
model
plt.plot(figsize=(10,10))
plt.subplot(221)
plt.plot(sim['k'], label='capital')
plt.plot(sim['y'], label='production')
plt.legend()
plt.subplot(222)
plt.plot(sim['g'], label='gvt. spending')
plt.plot(sim['c'], label='consumption')
plt.legend()
plt.subplot(223)
plt.plot(sim['n'], label='work')
plt.plot(sim['i'], label='investment')
plt.legend()
plt.subplot(224)
plt.plot(sim['w'], label='wages')
plt.legend()
Explanation: We want to compute the adjustment of the economy when this tax, goes back progressively from 10% to 0%, over 10 periods.
End of explanation
<END_TASK>