Decode (if needed) and return the ICS device serial string

        :param device: ics device
        :return: ics device serial string
        :rtype: str

def get_serial_number(device):
        """Decode (if needed) and return the ICS device serial string

        :param device: ics device
        :return: ics device serial string
        :rtype: str
        """
        a0000 = 604661760
        if device.SerialNumber >= a0000:
            return ics.base36enc(device.SerialNumber)
        return str(device.SerialNumber)