def _seconds_to_section_split(record, sections):
    """
    Finds the seconds to the next section from the datetime of a record.
    """

    next_section = sections[
        bisect_right(sections, _find_weektime(record.datetime))] * 60
    return next_section - _find_weektime(record.datetime, time_type='sec')
def _seconds_to_section_split ( record , sections ) : next_section = sections [ bisect_right ( sections , _find_weektime ( record . datetime ) ) ] * 60 return next_section - _find_weektime ( record . datetime , time_type = 'sec' )
Finds the seconds to the next section from the datetime of a record.