def _find_latest_usage_related_raw_id_for_request_id(self, orm, request_id):
        rawdata = orm.RawData.objects.filter(
            request_id=request_id,
            event__in=USAGE_EVENTS_EXCEPT_EXISTS).order_by('id')[:1].values('id')
        if 0 > rawdata.count():
            return rawdata[0]['id']
        return None
dataset/ETHPy150Open openstack/stacktach/stacktach/migrations/0003_populate_usage_related_fields_in_rawdataimagemeta_instanceexists_and_instanceusages_from_rawdata.py/Migration._find_latest_usage_related_raw_id_for_request_id/swapped operands of `>`