What is the dummy_address when creating an OP_RETURN in this example? Here we see:

mainnet = 0
if mainnet:
    dummy_address = "1111111111111111111114oLvT2"
else:
    dummy_address = "mfWxJ45yp2SFn7UciZyNpvDKrzbhyfKrY8"


What is this? No explanation is given. Can I create my own dummy address? What is this doing exactly, with some detail?
1111111111111111111114oLvT2 is the P2PKH address derived from a HASH160 consisting of all 0s.

mfWxJ45yp2SFn7UciZyNpvDKrzbhyfKrY8 is the same P2PKH address, but in its testnet encoding.

These are well known burn addresses, and any coins sent to either of them will be permanently lost. The example you linked uses them as they are easy to search for (which I don't really follow - any known address is easy to search for). You should replace them with an address for which you have the private key in your own code.