If a person does not want to rely on an electric pump, but wants to have one in case their mechanical one goes out, or use it to prime the carb, supplement the old mechanical unit, etc... a check valve can be used!
A check valve only allows the fuel to travel in one direction. In the picture, it is situated to only allow the fuel to travel towards the engine. Therefore, when the electric pump is turned on, it doesn't just push the fuel back to the tank. When the electric pump is turned off, the mechanical pump can draw the fuel around the electric one. The bold areas where the lines split are simple tees. Clever, eh?
Google 'check valve gasoline' and you will find plenty. They're also cheap.