結果 : define a class in a function python