code: func findExistingPermanode(ctx context.Context, qs search.QueryDescriber, wholeRef blob.Ref) (pn blob.Ref, err error) {
  	res, err := qs.Query(ctx, &search.SearchQuery{
  		Constraint: &search.Constraint{
  			Permanode: &search.PermanodeConstraint{
  				Attr: "camliContent",
  				ValueInSet: &search.Constraint{
  					File: &search.FileConstraint{
  						WholeRef: wholeRef,
  					},
  				},
  			},
  		},
  		Describe: &search.DescribeRequest{
  			Depth: 1,
  		},
  	})
  	if err != nil {
  		return
  	}
  	if res.Describe == nil {
  		return pn, os.ErrNotExist
  	}
  Res:
  	for _, resBlob := range res.Blobs {
  		br := resBlob.Blob
  		desBlob, ok := res.Describe.Meta[br.String()]
  		if !ok || desBlob.Permanode == nil {
  			continue
  		}
  		attrs := desBlob.Permanode.Attr
  		for _, attr := range sensitiveAttrs {
  			if attrs.Get(attr) != "" {
  				continue Res
  			}
  		}
  		return br, nil
  	}
  	return pn, os.ErrNotExist
  }
docs: // findExistingPermanode finds an existing permanode that has a
  // camliContent pointing to a file with the provided wholeRef and
  // doesn't have any conflicting attributes that would prevent the
  // picasa importer from re-using that permanode for its own use.