How to get xbee gateway serial number from Python program

How do I obtain the xbee gateway device id / serial number from a Python program running in the device?