<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_struct(klass, struct, timezone=pytz.UTC):
 """Returns MayaDT instance from a 9-tuple struct It's assumed to be from gmtime(). """

        struct_time = time.mktime(struct) - utc_offset(struct)
        dt = Datetime.fromtimestamp(struct_time, timezone)
        return klass(klass.__dt_to_epoch(dt))