code: func RemovePlan(p Plan) error {
  	parents := p.GetParents()
  	children := p.GetChildren()
  	if len(parents) > 1 || len(children) != 1 {
  		return SystemInternalErrorType.Gen("can't remove this plan")
  	}
  	if len(parents) == 0 {
  		child := children[0]
  		child.SetParents()
  		return nil
  	}
  	parent, child := parents[0], children[0]
  	err := parent.ReplaceChild(p, child)
  	if err != nil {
  		return errors.Trace(err)
  	}
  	err = child.ReplaceParent(p, parent)
  	return errors.Trace(err)
  }
docs: // RemovePlan means removing a plan.