def _update(self, url, data, kwargs, coerce):
        params = {}

        for k in data.keys():
            if data[k] is None:
                del data[k]

        if 'who' in kwargs and kwargs['who'] is not None:
            params['_who'] = kwargs['who']

        if kwargs in 'why' and kwargs['why'] is not None:
            params['_why'] = kwargs['why']

        headers = kwargs.get('headers', {})
        resp = self.connection.request(url, method='PUT', params=params,
                                       data=data, headers=headers)

        if resp.status == httplib.NO_CONTENT:
            # location
            # /v1.0/{object_type}/{id}
            location = resp.headers.get('location')
            if not location:
                raise LibcloudError('Missing location header')

            obj_ids = self._url_to_obj_ids(location)
            return coerce(**obj_ids)
        else:
            raise LibcloudError('Unexpected status code: %s' % (resp.status))
dataset/ETHPy150Open racker/rackspace-monitoring/rackspace_monitoring/drivers/rackspace.py/RackspaceMonitoringDriver._update/swapped operands of `in`