code: def _step_end(self, log=True):
          
          if log:
              step_end_time = self.log(u"STEP %d END (%s)" % (self.step_index, self.step_label))
              diff = (step_end_time - self.step_begin_time)
              diff = float(diff.seconds + diff.microseconds / 1000000.0)
              self.step_total += diff
              self.log(u"STEP %d DURATION %.3f (%s)" % (self.step_index, diff, self.step_label))
              self.step_index += 1
docs: Log end of a step