python function attribute decorator