docs: def add_label(self, doc, label, update_index=True):
          """
          Add a label on a document.
  
          Arguments:
              label --- The new label (see labels.Label)
              doc --- The first document on which this label has been added
          """
          label = copy.copy(label)
          assert(label in self.labels.values())
          doc.add_label(label)
          if update_index:
              self.upd_doc(doc)
              self.commit()