code: func CheckPackageExists(c context.Context, pkg string) error {
  	switch res, err := CheckPackages(c, []string{pkg}, true); {
  	case err != nil:
  		return errors.Annotate(err, "failed to check the package presence").Err()
  	case len(res) == 0:
  		return errors.Reason("no such package").Tag(grpcutil.NotFoundTag).Err()
  	default:
  		return nil
  	}
  }
docs: // CheckPackageExists verifies the package exists.
  //
  // Returns gRPC-tagged NotFound error if there's no such package.