<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def utc_offset(time_struct=None):
 """ Returns the time offset from UTC accounting for DST Keyword Arguments: time_struct {time.struct_time} -- the struct time for which to return the UTC offset. If None, use current local time. """

    if time_struct:
        ts = time_struct
    else:
        ts = time.localtime()

    if ts[-1]:
        offset = time.altzone
    else:
        offset = time.timezone
    return offset