Imported from https://github.com/MeileiJiang/AJIVE_Project