code: func (c *SearchCall) Fetch(limit int, ret retry.Factory) ([]*ApiCommonBuildMessage, string, error) {
  	// Default page size to 100 because we are fetching everything.
  	maxBuildsKey := "max_builds"
  	origMaxBuilds := c.urlParams_.Get(maxBuildsKey)
  	if origMaxBuilds == "" {
  		c.MaxBuilds(100)
  		defer c.urlParams_.Set(maxBuildsKey, origMaxBuilds)
  	}
  
  	ch := make(chan *ApiCommonBuildMessage)
  	var err error
  	var cursor string
  	go func() {
  		defer close(ch)
  		cursor, err = c.Run(ch, limit, ret)
  	}()
  
  	var builds []*ApiCommonBuildMessage
  	for b := range ch {
  		builds = append(builds, b)
  	}
  	return builds, cursor, err
  }
docs: // Fetch fetches builds matching the search criteria.
  // It stops when all builds are found or when context is cancelled.
  // The order of returned builds is from most-recently-created to least-recently-created.
  //
  // c.MaxBuilds value is used as a result page size, defaults to 100.
  // limit, if >0, specifies the maximum number of builds to return.
  //
  // If ret is nil, retries transient errors with exponential back-off.
  // Logs errors on retries.
  //
  // Returns nil only if the search results are exhausted.
  // May return context.Canceled.