Don’t. Even if you understand what you’re doing, someone else won’t and your family will die in a house fire.
Male-to-male end cables allow for the two leads of an open male end to make contact with anything conductive (including your flesh, causing some pretty gnarly burns) to complete the circuit and start a fire. No conscionable electrician will make these for you. It is the dumbest solution to any problem you’re looking to solve. Don’t.
Just a reminder coming up on Christmas.


Christmas lights come in strings with a male plug on one end and female on the other allowing for chaining together multiple lights, sometimes in the course of hanging them up people create a situation where they think they want to connect the two female ends together, thus they think this is the solution.
The hardware store here has a big sign up about this every winter, explaining why, if you think need this you are wrong, if you ask for one we will not give you one, if you make one yourself you will probably die.