Looking for sample code to initialize 2 modules to communicate and store their addresses programmatically

If there are two new modules, and load micropython code that looks for another module, finds it, saves its 64 address to flash, that could be used for the next power down, power up cycle and keep the address it found to communicate with…

the second module would do the same thing…

Anything out there like this?

I am not aware of any sample code that does this. But I suspect using the Node Discovery command with the sample AT command code would be a good place to start.