def get_cool_off_iso8601(delta: timedelta) -> str:
seconds = delta.total_seconds()<EOL>minutes, seconds = divmod(seconds, <NUM_LIT>)<EOL>hours, minutes = divmod(minutes, <NUM_LIT>)<EOL>days, hours = divmod(hours, <NUM_LIT>)<EOL>days_str = f'<STR_LIT>' if days else '<STR_LIT>'<EOL>time_str = '<STR_LIT>'.join(<EOL>f'<STR_LIT>'<EOL>for value, designator<EOL>in [<EOL>[hours, '<STR_LIT:H>'],<EOL>[minutes, '<STR_LIT:M>'],<EOL>[seconds, '<STR_LIT:S>'],<EOL>]<EOL>if value<EOL>)<EOL>if time_str:<EOL><INDENT>return f'<STR_LIT>'<EOL><DEDENT>return f'<STR_LIT>'<EOL>
Return datetime.timedelta translated to ISO 8601 formatted duration for use in e.g. cool offs.