def _get_segment_from_id(segment_obj_list, segment_id):
    """ Get a segment from a list, based on a segment id """
    found_segment_obj = None
    for segment_obj in segment_obj_list:
        if segment_obj.id == segment_id:
            found_segment_obj = segment_obj
            break
    return found_segment_obj