The main pre-req for the modem is that it sets up a serial port, and I think that most or all do.
I have personally only tested with four different Huawei modems and those all work. There may or may not be problems with the usb port set up as for powersave which can cause the port to die. Only solution for that so far is to unplug the modem and re-plug, but that really has nothing to do with the script itself.
I assume the python script is installed in a computer such as Raspberry Pi and then a USB modem such as HUAWEI E3372 is plugged into the the same computer?
I like to have an as Internet free HomeAssistant setup as possible. The GSM modem i something I just happened to have laying around so it was easy to use and configure. I can also receive commands to HA that way even though I haven’t implemented that part yet.