#NEWLINE# def get_time_bounds( self ) : #NEWLINE# #INDENT# '\n        Gets the time bound (start and end) of the segment.\n\n        returns\n        ----------\n        time_bounds : TimeBounds named tuple\n            start_time : datetime\n                Start time of the first segment in track\n            end time : datetime\n                End time of the last segment in track\n        ' #NEWLINE# start_time = None #NEWLINE# end_time = None #NEWLINE# for point in self . points : #NEWLINE# #INDENT# if point . time : #NEWLINE# #INDENT# if ( not start_time ) : #NEWLINE# #INDENT# start_time = self . time #NEWLINE# #UNINDENT# if point . time : #NEWLINE# #INDENT# end_time = point . time #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return TimeBounds ( start_time , end_time )