code: func (i *ImageService) removeAllReferencesToImageID(imgID image.ID, records *[]types.ImageDeleteResponseItem) error {
  	imageRefs := i.referenceStore.References(imgID.Digest())
  
  	for _, imageRef := range imageRefs {
  		parsedRef, err := i.removeImageRef(imageRef)
  		if err != nil {
  			return err
  		}
  
  		untaggedRecord := types.ImageDeleteResponseItem{Untagged: reference.FamiliarString(parsedRef)}
  
  		i.LogImageEvent(imgID.String(), imgID.String(), "untag")
  		*records = append(*records, untaggedRecord)
  	}
  
  	return nil
  }
docs: // removeAllReferencesToImageID attempts to remove every reference to the given
  // imgID from this daemon's store of repository tag/digest references. Returns
  // on the first encountered error. Removed references are logged to this
  // daemon's event service. An "Untagged" types.ImageDeleteResponseItem is added to the
  // given list of records.