code: def create_epochs(self, epoch_length=30, first_second=None):
          
          lg.info('creating epochs of length ' + str(epoch_length))
          if first_second is None:
              first_second = self.first_second
          last_sec = ceil((self.last_second - first_second) /
                          epoch_length) * epoch_length
  
          stages = self.rater.find('stages')
          for epoch_beg in range(first_second, last_sec, epoch_length):
              epoch = SubElement(stages, 'epoch')
  
              start_time = SubElement(epoch, 'epoch_start')
              start_time.text = str(epoch_beg)
  
              end_time = SubElement(epoch, 'epoch_end')
              end_time.text = str(epoch_beg + epoch_length)
  
              stage = SubElement(epoch, 'stage')
              stage.text = 'Unknown'
  
              quality = SubElement(epoch, 'quality')
              quality.text = 'Good'
docs: Create epochs in annotation file.
          Parameters
          ----------
          epoch_length : int
              duration in seconds of each epoch
          first_second : int, optional
              Time, in seconds from record start, at which the epochs begin