code: func ParseAnyReferenceWithSet(ref string, ds *digestset.Set) (Reference, error) {
  	if ok := anchoredShortIdentifierRegexp.MatchString(ref); ok {
  		dgst, err := ds.Lookup(ref)
  		if err == nil {
  			return digestReference(dgst), nil
  		}
  	} else {
  		if dgst, err := digest.Parse(ref); err == nil {
  			return digestReference(dgst), nil
  		}
  	}
  
  	return ParseNormalizedNamed(ref)
  }
docs: // ParseAnyReferenceWithSet parses a reference string as a possible short
  // identifier to be matched in a digest set, a full digest, or familiar name.