Sweep?

So I’ve just had my 36 week appointment and go back to see midwife when I’ll be 38 weeks 5 days. She said she can examine me and do a sweep but it’s completely up to me and to decide in the next two weeks.

What actually happens in a sweep?