code: func (m TaskManager) withBuildbucket(c context.Context, ctl task.Controller, cb func(context.Context, *bbv1.Service) error) error {
  	c, cancel := clock.WithTimeout(c, time.Minute)
  	defer cancel()
  
  	client, err := ctl.GetClient(c)
  	if err != nil {
  		return err
  	}
  	service, err := bbv1.New(client)
  	if err != nil {
  		return err
  	}
  
  	cfg := ctl.Task().(*messages.BuildbucketTask)
  	service.BasePath = makeServerUrl(cfg.Server) + "/_ah/api/buildbucket/v1/"
  
  	return cb(c, service)
  }
docs: // withBuildbucket makes a Buildbucket API client and calls the callback.
  //
  // The callback runs under a new context with 1 min deadline. Make sure to pass
  // it to call RPCs by using call.Context(c).