def longest_time(time_list):
    """Helper function to calculate longest time from time list"""
    _longest_time = None
    for demo_time in time_list:
        if _longest_time:
            if demo_time > _longest_time:
                _longest_time = demo_time
        else:
            _longest_time = demo_time

    return _longest_time