def bulk_put(self, regs, doc_type, root_label, version):
    self.Document.objects.filter(version=version, doc_type=doc_type, label_string__startswith=root_label).delete()
    treeify(regs[0], self.Document.objects._get_next_tree_id())
    self.Document.objects.bulk_create([self._transform(r, doc_type, version) for r in regs], batch_size=25)
def bulk_put(self, regs, doc_type, root_label, version):
    self.Document.objects.filter(version=version, doc_type=doc_type, label_string__startswith=root_label).delete()
    treeify(regs[0], self.Document.objects._get_next_tree_id())
    self.Document.objects.bulk_create([self._transform(r, doc_type, version) for r in regs], batch_size=25)