def send(self, regids, data=None, collapse_key=None, ttl=None, retries=5):
        '''
        Send message to google gcm endpoint
        :param regids: list
        :param data: dict
        :param collapse_key: string
        :param ttl: int
        :param retries: int
        '''
        if not regids:
            raise GCMException("Registration IDs cannot be empty")

        payload = self.build_request(regids, data, collapse_key, ttl)
        headers = {"content-type":"application/json", 'Authorization': 'key=%s' % self.apikey}
        response = requests.post(self.endpoint, data=payload, headers=headers)

        if response.status_code == 400:
            raise GCMException('Request could not be parsed as JSON, or it contained invalid fields.')
        elif response.status_code == 401:
            raise GCMException('There was an error authenticating the sender account.')
        elif 500 >= response.status_code:
            raise GCMException('GCMClient server is temporarily unavailable .')

        responsedata = response.json()
        if responsedata.get('canonical_ids', 0) != 0:
            # means we need to take a look at results, looking for registration_id key
            responsedata['canonical_ids'] = self.reverse_response_info('registration_id', regids, responsedata['results'])

        # Handling errors
        if responsedata.get('failure', 0) != 0:
            # means we need to take a look at results, looking for error key
            errors = self.reverse_response_info('error', regids, responsedata['results'])
            for errorkey, packed_rregisteration_ids in errors.items():
                # Check for errors and act accordingly
                if errorkey == 'NotRegistered':
                    # Should remove the registration ID from your server database
                    # because the application was uninstalled from the device or
                    # it does not have a broadcast receiver configured to receive
                    raise GCMNotRegisteredException(packed_rregisteration_ids)
                elif errorkey == 'InvalidRegistration':
                    # You should remove the registration ID from your server
                    # database because the application was uninstalled from the device or it does not have a broadcast receiver configured to receive
                    raise GCMInvalidRegistrationException(packed_rregisteration_ids)
                elif errorkey == 'MismatchSenderId':
                    '''
                    A registration ID is tied to a certain group of senders. When an application registers for GCMClient usage,
                    it must specify which senders are allowed to send messages. Make sure you're using one of those when
                    trying to send messages to the device. If you switch to a different sender, the existing registration
                    IDs won't work.
                    '''
                    raise GCMException('Mismatch sender Id')
                elif errorkey == 'MissingRegistration':
                    '''
                    Check that the request contains a registration ID (either in the registration_id parameter in a
                    plain text message, or in the registration_ids field in JSON).
                    '''
                    raise GCMException('Missing registration')
                elif errorkey == 'MessageTooBig':
                    raise GCMException('Message too big')
                elif errorkey == 'InvalidDataKey':
                    raise GCMException('Invalid data key')
                elif errorkey == 'InvalidTtl':
                    raise GCMException('Invalid Ttl')
                elif errorkey == 'InvalidPackageName':
                    raise GCMException('Invalid package name')
                raise GCMException('Unknown error, contact admin')

        return response
dataset/ETHPy150Open airnotifier/airnotifier/pushservices/gcm.py/GCMClient.send/swapped operands of `>=`