Like mpremote's edit See: https://github.com/micropython/micropython/blob/5f058e9863c0770aa8a4defe23f70919cea94160/tools/mpremote/mpremote/commands.py#L458-L479