'Update a stage with it\'s percent, and process accordingly.
stage_percent should be between 0 and 1'

def update_stage(self, stage_name, stage_percent, stage_status=None, notes=None):

    assert ((0.0 <= stage_percent <= 1.0) or (stage_percent is None)), 'stage    percent    must    be    between    0    and    1.'
    assert ((self.end_time is None) and (self.completed == False)), 'Cannot    update    processes    that    have    been    ended.'
    if (stage_name and (self.stage_name != stage_name)):
        if self.stage_name:
            self.notes = None
            self.current_stage += 1
        else:
            self.current_stage = 1
        self.stage_name = stage_name
    self.stage_percent = (stage_percent if (stage_percent is not None) else self.stage_percent)
    self.process_percent = self._compute_process_percent()
    self.stage_status = stage_status
    self.notes = (notes or self.notes)
    self.save()
