def previous_friday(dt):
if dt.weekday() == <NUM_LIT:5>:<EOL><INDENT>return dt - timedelta(<NUM_LIT:1>)<EOL><DEDENT>elif dt.weekday() == <NUM_LIT:6>:<EOL><INDENT>return dt - timedelta(<NUM_LIT:2>)<EOL><DEDENT>return dt<EOL>
If holiday falls on Saturday or Sunday, use previous Friday instead.