code: func bytesHaveSchemaLink(br blob.Ref, bb []byte, target blob.Ref) bool {
  	// Fast path for no:
  	if !bytes.Contains(bb, []byte(target.String())) {
  		return false
  	}
  	b, err := schema.BlobFromReader(br, bytes.NewReader(bb))
  	if err != nil {
  		return false
  	}
  	typ := b.Type()
  	switch typ {
  	case "file", "bytes":
  		for _, bp := range b.ByteParts() {
  			if bp.BlobRef.Valid() {
  				if bp.BlobRef == target {
  					return true
  				}
  			}
  			if bp.BytesRef.Valid() {
  				if bp.BytesRef == target {
  					return true
  				}
  			}
  		}
  	case "directory":
  		if d, ok := b.DirectoryEntries(); ok {
  			return d == target
  		}
  	case "static-set":
  		for _, m := range b.StaticSetMembers() {
  			if m == target {
  				return true
  			}
  		}
  	}
  	return false
  }
docs: // bytesHaveSchemaLink reports whether bb is a valid Perkeep schema
  // blob and has target somewhere in a schema field used to represent a
  // Merkle-tree-ish file or directory.