code: def _disconnect_parent(self, *args, **kw):
          
          for name, iop in list(self._index_operations.items()):
              iopc = iop.copy()
              iop.clear()
              self.remove_index_operation(name)
              self.add_index_operation(name, iopc)
          #self.constraints.clear()
          #self.constraints = constr
          self._parent_ = None
          self._parent_index_ = None
          self._connect_fixes()
          self._notify_parent_change()
docs: From Parentable:
          disconnect the parent and set the new constraints to constr