code: func checkExistingTags(c context.Context, inst *Instance, tags []*api.Tag) (exist, miss []*Tag, err error) {
  	instKey := datastore.KeyForObj(c, inst)
  	tagEnts := make([]*Tag, len(tags))
  	for i, tag := range tags {
  		tagEnts[i] = &Tag{
  			ID:       TagID(tag),
  			Instance: instKey,
  		}
  	}
  	return fetchTags(c, tagEnts, func(i int) *api.Tag { return tags[i] })
  }
docs: // checkExistingTags takes a list of tags and returns the ones that exist
  // in the datastore and ones that don't.
  //
  // Checks 'Tag' field on existing tags, thus safeguarding against malicious
  // SHA1 collisions in TagID().
  //
  // Tags in 'miss' list have only their key and 'Tag' fields set and nothing
  // more.