How do you get the doctor to test for the gender early?

I am 9 weeks along and I don’t know how to get the blood test where you’re told the gender, my grandma (who basically raised me) has been struggling with brain cancer for the past 2 Months and she could leave us at any moment, she has been SOOOO exited about this pregnancy and I wanted to surprise her with a gender reveal. I’m afraid she won’t be here by the time I would usually find out, but I’m also pretty sure the ob usually doesn’t test so early on or else wouldn’t everyone do it?