code: func (impl *repoImpl) DetachTags(c context.Context, r *api.DetachTagsRequest) (resp *empty.Empty, err error) {
  	defer func() { err = grpcutil.GRPCifyAndLogErr(c, err) }()
  
  	// Validate the request.
  	if err := validateMultiTagReq(r.Package, r.Instance, r.Tags); err != nil {
  		return nil, err
  	}
  
  	// Check ACLs. Note this is scoped to OWNERS, see the proto doc.
  	if _, err := impl.checkRole(c, r.Package, api.Role_OWNER); err != nil {
  		return nil, err
  	}
  
  	// Verify the instance exists, per DetachTags contract.
  	inst := &model.Instance{
  		InstanceID: common.ObjectRefToInstanceID(r.Instance),
  		Package:    model.PackageKey(c, r.Package),
  	}
  	if err := model.CheckInstanceExists(c, inst); err != nil {
  		return nil, err
  	}
  
  	// Actually detach the tags.
  	if err := model.DetachTags(c, inst, r.Tags); err != nil {
  		return nil, err
  	}
  	return &empty.Empty{}, nil
  }
docs: // DetachTags implements the corresponding RPC method, see the proto doc.