How can someone spoof their phone number / caller id?

How can someone spoof their caller ID. Basically make it look like someone else is calling when actually it’s you. If their is a way to do this I specifically want to know how to do it with python. If you can’t do it with python, how can you do it in general. Note: I do not want to use any programs other people made I want to make mine from scratch.