This is a copy of the work in `store_media_components`.  Utility function?