Get off the road. Carry a flashlight with you so you can signal. Walk (well off the road) towards the direction that traffic is coming from and try to signal. Use your phone if you have nothing better. Don’t know how I would do in this situation but this is what I hope I would do. And I do normally have a flashlight in my pocket.