Group B test

Just curious as to how this is administered. I've heard it's a swab that is put in your vagina and then your anus. Do you do the swab yourself or does the doctor do it for you? TIA.