結果 : how to implement scd type 2 in python