code: func (impl *repoImpl) setPackageHidden(c context.Context, r *api.PackageRequest, hidden bool) (resp *empty.Empty, err error) {
  	defer func() { err = grpcutil.GRPCifyAndLogErr(c, err) }()
  
  	if err := common.ValidatePackageName(r.Package); err != nil {
  		return nil, status.Errorf(codes.InvalidArgument, "bad 'package' - %s", err)
  	}
  	if _, err := impl.checkRole(c, r.Package, api.Role_OWNER); err != nil {
  		return nil, err
  	}
  
  	switch err := model.SetPackageHidden(c, r.Package, hidden); {
  	case err == datastore.ErrNoSuchEntity:
  		return nil, status.Errorf(codes.NotFound, "no such package")
  	case err != nil:
  		return nil, errors.Annotate(err, "failed to update the package").Err()
  	}
  	return &empty.Empty{}, nil
  }
docs: // setPackageHidden is common implementation of HidePackage and UnhidePackage.