結果 : python conditionally define function