<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_timedelta(cls, datetime_obj, duration):
 """Create a new TimeInterval object from a start point and a duration. If duration is positive, datetime_obj is the start of the interval; if duration is negative, datetime_obj is the end of the interval. Parameters datetime_obj : datetime.datetime duration : datetime.timedelta Returns ------- neutils.time.TimeInterval """

        if duration.total_seconds() > 0:
            return TimeInterval(datetime_obj, datetime_obj + duration)
        else:
            return TimeInterval(datetime_obj + duration, datetime_obj)