Yes this is ugly but I did not have time to make it prettier. Feel free to open a PR ;)
Input should be two csv files with the following columns (order matters!):
Member Name,Member Email,Member Relation Type,Member Type
Output will be a csv file with the following columns:
Group Email [required],Member Email