How to check groups that user belongs to

I’m adding some functionality to spark and I need to know if user belongs to some groups. How to check it?

I mean current logged user. Other users on list I can check from roosterEntries, but how to check groups for current user?