Pretty sure it’s this one
Basically open the serial port at 1200 baud and wait for a new port to appear.
I’ve looked through the GitHub - platformio/platformio-core: A professional collaborative platform for embedded development code but couldn’t actually find the python code where this is handled though :(.