code: func buildPutManifestRequest(imageManifest types.ImageManifest, targetRef reference.Named) (mountRequest, error) {
  	refWithoutTag, err := reference.WithName(targetRef.Name())
  	if err != nil {
  		return mountRequest{}, err
  	}
  	mountRef, err := reference.WithDigest(refWithoutTag, imageManifest.Descriptor.Digest)
  	if err != nil {
  		return mountRequest{}, err
  	}
  
  	// This indentation has to be added to ensure sha parity with the registry
  	v2ManifestBytes, err := json.MarshalIndent(imageManifest.SchemaV2Manifest, "", "   ")
  	if err != nil {
  		return mountRequest{}, err
  	}
  	// indent only the DeserializedManifest portion of this, in order to maintain parity with the registry
  	// and not alter the sha
  	var v2Manifest schema2.DeserializedManifest
  	if err = v2Manifest.UnmarshalJSON(v2ManifestBytes); err != nil {
  		return mountRequest{}, err
  	}
  	imageManifest.SchemaV2Manifest = &v2Manifest
  
  	return mountRequest{ref: mountRef, manifest: imageManifest}, err
  }
docs: // nolint: interfacer