code: func (impl *repoImpl) SearchInstances(c context.Context, r *api.SearchInstancesRequest) (resp *api.SearchInstancesResponse, err error) {
  	defer func() { err = grpcutil.GRPCifyAndLogErr(c, err) }()
  
  	result, nextPage, err := impl.paginatedQuery(c, paginatedQueryOpts{
  		Package:   r.Package,
  		PageSize:  r.PageSize,
  		PageToken: r.PageToken,
  		Validator: func() error { return validateTagList(r.Tags) },
  		Handler: func(cur datastore.Cursor, pageSize int32) ([]*model.Instance, datastore.Cursor, error) {
  			return model.SearchInstances(c, r.Package, r.Tags, pageSize, cur)
  		},
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	return &api.SearchInstancesResponse{
  		Instances:     result,
  		NextPageToken: nextPage,
  	}, nil
  }
docs: // SearchInstances implements the corresponding RPC method, see the proto doc.