Run function if player is in dimension

I want to make it so a function gets run only when the player is in the nether. How would I do that?

Continue to help post