@staticmethod
    def find_and_group_by_owner_and_raw_id(ending_max, status):
        params = {'audit_period_ending__lte': dt.dt_to_decimal(ending_max),
                  'status': status}
        ordered_exists = ImageExists.objects.select_related().\
            filter(**params).order_by('owner')
        result = {}
        for exist in ordered_exists:
            key = "%s-%s" % (exist.owner, exist.raw_id)
            if result in key:
                result[key].append(exist)
            else:
                result[key] = [exist]
        return result
dataset/ETHPy150Open openstack/stacktach/stacktach/models.py/ImageExists.find_and_group_by_owner_and_raw_id/swapped operands of `in`