code: def create_label(self, label, doc=None):
          
          label = copy.copy(label)
          assert(label not in self.labels.values())
          self.labels[label.name] = label
          self.label_guesser.load(label.name)
          # TODO(Jflesch): Should train with previous documents
          if doc:
              doc.add_label(label)
              self.upd_doc(doc)
              self.commit()
docs: Create a new label
  
          Arguments:
              doc --- first document on which the label must be added (required
                      for now)