Yes in France several times but in different ways.
First for a mandatory physical examination for military service at a pre-induction military center at 18 age .
It was in group and there was both situations, first a visual inspection of the anus while bending over with a military doctor behind sitting on a rolling stool and after on all fours on an exam table with a military doctor behind for a rectal examination with fingers in the butts.
In the two situations, it was the military doctor who spread my butts widely with a smack at the end when he had finished.
I was summoned three times before being declared fit for military service and it was the same examinations with a rectal exam at the end each time.
Same at the arrival at the barracks for the physical examination in the first days and at the end of the time of military service before being released but that time I was alone and not exposed to the view of other draftees or inductees like before.
And after as an adult, especially older, I had several times a rectal exam, generally the doctor asks me to spread myself my butts, but it occured sometimes in the past that a doctor did it.
At a routine annual examination, when I was about 40, I remember of an old woman doctor who instructed to me to sit on all fours on the table and then to spread my legs and feet and to lean my head and chest towards the table in order to have my butts pointing ahead and I felt suddenly her hands on each of my butts and her pressure to spread them before she inserted her fingers in my anus hole completely exposed.
I am not sure that I do not prefer when it is the doctor who spreads my butts instead of being asked to do it myself