Python Set Attribute In Function Mylab