Adding Groups to Mailchimp Sync

I’m developing a website for my company and we’re trying to sync the assigned group data in buddy press with the user so when we go into mailchimp we can sort/partition our lists in mailchimp by the corresponding group.

The code we’re using to sync all the other data in extended profile is here, but my concern is that we can’t pull the group the same way because it’s not something that gets added in the extended profile. I’m almost certain that I can’t pull the group with these parameters because when i look in the database, there’s no user-ID tied to any group. However, when i go into buddypress groups there’s users assigned to them.