code: func getBuildersForProject(c context.Context, project, console string) ([]string, error) {
  	var cons []*common.Console
  
  	// Get consoles for project and extract builders into set.
  	projKey := datastore.MakeKey(c, "Project", project)
  	if console == "" {
  		q := datastore.NewQuery("Console").Ancestor(projKey)
  		if err := datastore.GetAll(c, q, &cons); err != nil {
  			return nil, errors.Annotate(
  				err, "error getting consoles for project %s", project).Err()
  		}
  	} else {
  		con := common.Console{Parent: projKey, ID: console}
  		switch err := datastore.Get(c, &con); err {
  		case nil:
  		case datastore.ErrNoSuchEntity:
  			return nil, errors.Annotate(
  				err, "error getting console %s in project %s", console, project).
  				Tag(grpcutil.NotFoundTag).Err()
  		default:
  			return nil, errors.Annotate(
  				err, "error getting console %s in project %s", console, project).Err()
  		}
  		cons = append(cons, &con)
  	}
  
  	bSet := stringset.New(0)
  	for _, con := range cons {
  		for _, builder := range con.Builders {
  			bSet.Add(builder)
  		}
  	}
  
  	// Get sorted builders.
  	builders := bSet.ToSlice()
  	sort.Strings(builders)
  	return builders, nil
  }
docs: // getBuildersForProject gets the sorted builder IDs associated with the given project.