Some useful python decorator