<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_label(self, old_label, new_label, callback=dummy_progress_cb):
 """ Replace 'old_label' by 'new_label' on all the documents. Takes care of updating the index. """

        current = 0
        total = self.index.get_nb_docs()
        self.index.start_update_label(old_label, new_label)
        while True:
            (op, doc) = self.index.continue_update_label()
            if op == 'end':
                break
            callback(current, total, self.LABEL_STEP_UPDATING, doc)
            current += 1
        self.index.end_update_label()