Path 1: 13 calls (0.93)

2004 (11) 9999 (1) 2001 (1)

12 (2) 2 (2) 3 (1) 4 (1) 5 (1) 6 (1) 7 (1) 8 (1) 9 (1) 10 (1)

(9999, 11) (1) (2001, 1) (1) (2004, 1) (1) (2004, 2) (1) (2004, 3) (1) (2004, 4) (1) (2004, 5) (1) (2004, 6) (1) (2004, 7) (1) (2004, 8) (1)

1def _prevmonth(year, month):
2    if month == 1:
3        return year-1, 12
4    else:
5        return year, month-1
            

Path 2: 1 calls (0.07)

2004 (1)

1 (1)

(2003, 12) (1)

1def _prevmonth(year, month):
2    if month == 1:
3        return year-1, 12
4    else:
5        return year, month-1