code: 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')
docs: Finds the seconds to the next section from the datetime of a record.