<%def name="display_n_times_with_style(style, n=1)">

% for i in range(n): ${caller.body()}
% endfor

<%call expr="display_n_times_with_style(style='color: blue')"> Buy me! <%call expr="display_n_times_with_style(style='color: red', n=3)"> Buy me now!