code: func getDatastoreBuild(c context.Context, id buildbot.BuildID) (*buildbot.Build, error) {
  	if err := id.Validate(); err != nil {
  		return nil, err
  	}
  
  	entity := &buildEntity{
  		Master:      id.Master,
  		Buildername: id.Builder,
  		Number:      id.Number,
  	}
  
  	err := datastore.Get(c, entity)
  	if err == datastore.ErrNoSuchEntity {
  		return nil, nil
  	}
  
  	entity.addViewPath()
  
  	return (*buildbot.Build)(entity), err
  }
docs: // getDatastoreBuild returns a buildbot build from the datastore.
  // Returns (nil, nil) if build is not found.