def to_tuple(value, strict=True, force_int=True):
if isinstance(value, int):<EOL><INDENT>seconds = value<EOL>minutes, seconds = divmod(seconds, <NUM_LIT>)<EOL>hours, minutes = divmod(minutes, <NUM_LIT>)<EOL><DEDENT>elif isinstance(value, str):<EOL><INDENT>hours, minutes, seconds = _fix_tuple(<EOL>_parse(value, strict)<EOL>)<EOL><DEDENT>elif isinstance(value, tuple):<EOL><INDENT>check_tuple(value, strict)<EOL>hours, minutes, seconds = _fix_tuple(value)<EOL><DEDENT>elif isinstance(value, timedelta):<EOL><INDENT>seconds = value.total_seconds()<EOL>if force_int:<EOL><INDENT>seconds = int(round(seconds))<EOL><DEDENT>minutes, seconds = divmod(seconds, <NUM_LIT>)<EOL>hours, minutes = divmod(minutes, <NUM_LIT>)<EOL><DEDENT>return (hours, minutes, seconds,)<EOL>
converts duration value to tuple of integers

strict=True (by default) raises StrictnessError if either hours,
minutes or seconds in duration value exceed allowed values