code: func (ra *ResourceAllocator) DetachNetwork(ctx context.Context, request *api.DetachNetworkRequest) (*api.DetachNetworkResponse, error) {
  	if request.AttachmentID == "" {
  		return nil, status.Errorf(codes.InvalidArgument, errInvalidArgument.Error())
  	}
  
  	nodeInfo, err := ca.RemoteNode(ctx)
  	if err != nil {
  		return nil, err
  	}
  
  	if err := ra.store.Update(func(tx store.Tx) error {
  		t := store.GetTask(tx, request.AttachmentID)
  		if t == nil {
  			return status.Errorf(codes.NotFound, "attachment %s not found", request.AttachmentID)
  		}
  		if t.NodeID != nodeInfo.NodeID {
  			return status.Errorf(codes.PermissionDenied, "attachment %s doesn't belong to this node", request.AttachmentID)
  		}
  
  		return store.DeleteTask(tx, request.AttachmentID)
  	}); err != nil {
  		return nil, err
  	}
  
  	return &api.DetachNetworkResponse{}, nil
  }
docs: // DetachNetwork allows the node to request the release of
  // the resources associated to the network attachment.
  // - Returns `InvalidArgument` if attachment ID is not provided.
  // - Returns `NotFound` if the attachment is not found.
  // - Returns an error if the deletion fails.