code: func (l *tarexporter) takeLayerReference(id image.ID, imgDescr *imageDescriptor) error {
  	img, err := l.is.Get(id)
  	if err != nil {
  		return err
  	}
  	imgDescr.image = img
  	topLayerID := img.RootFS.ChainID()
  	if topLayerID == "" {
  		return nil
  	}
  	os := img.OS
  	if os == "" {
  		os = runtime.GOOS
  	}
  	if !system.IsOSSupported(os) {
  		return fmt.Errorf("os %q is not supported", os)
  	}
  	layer, err := l.lss[os].Get(topLayerID)
  	if err != nil {
  		return err
  	}
  	imgDescr.layerRef = layer
  	return nil
  }
docs: // takeLayerReference will take/Get the image top layer reference