def convert_dt_time(duration, return_iter=False):
try:<EOL><INDENT>days, hours, minutes, seconds = convert_timedelta(duration)<EOL>if return_iter:<EOL><INDENT>return days, hours, minutes, seconds<EOL><DEDENT>if days > <NUM_LIT:0>:<EOL><INDENT>format_string = (<EOL>'<STR_LIT>'.format(<EOL>days, '<STR_LIT:s>' if days != <NUM_LIT:1> else '<STR_LIT>', hours, '<STR_LIT:s>' if hours != <NUM_LIT:1> else '<STR_LIT>'))<EOL><DEDENT>elif hours > <NUM_LIT:1>:<EOL><INDENT>format_string = (<EOL>'<STR_LIT>'.format(<EOL>hours, '<STR_LIT:s>' if hours != <NUM_LIT:1> else '<STR_LIT>', minutes, '<STR_LIT:s>' if minutes != <NUM_LIT:1> else '<STR_LIT>'))<EOL><DEDENT>else:<EOL><INDENT>format_string = (<EOL>'<STR_LIT>'.format(<EOL>minutes, '<STR_LIT:s>' if minutes != <NUM_LIT:1> else '<STR_LIT>', seconds, '<STR_LIT:s>' if seconds != <NUM_LIT:1> else '<STR_LIT>'))<EOL><DEDENT><DEDENT>except AttributeError as e:<EOL><INDENT>logger.exception(<EOL>'<STR_LIT>' %<EOL>(inspect.stack()[<NUM_LIT:0>][<NUM_LIT:3>], str(e)))<EOL><DEDENT>except Exception as e:<EOL><INDENT>logger.exception(<EOL>'<STR_LIT>' %<EOL>(inspect.stack()[<NUM_LIT:0>][<NUM_LIT:3>], str(e)))<EOL><DEDENT>return format_string<EOL>
Summary:
    convert timedelta objects to human readable output
Args:
    :duration (datetime.timedelta): time duration to convert
    :return_iter (tuple):  tuple containing time sequence
Returns:
    days, hours, minutes, seconds | TYPE: tuple (integers), OR
    human readable, notated units | TYPE: string