<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def seconds_to_DHMS(seconds, as_str=True):
 """converts seconds to Days, Hours, Minutes, Seconds :param int seconds: number of seconds :param bool as_string: to return a formated string defaults to True :returns: a formated string if as_str else a dictionary :Example: 001-00:00:00 {'hours': 0, 'seconds': 0, 'minutes': 0, 'days': 1} """

    d = DotDot()
    d.days = int(seconds // (3600 * 24))
    d.hours = int((seconds // 3600) % 24)
    d.minutes = int((seconds // 60) % 60)
    d.seconds = int(seconds % 60)
    return FMT_DHMS_DICT.format(**d) if as_str else d