@property
    @memoized
    def last_month_reporting_sp_ids(self):
        return StockState.objects.filter(
            last_modified_date__gte=datetime.utcnow() - timedelta(days=32),
            sql_location__location_id__in=self.supply_points_locations_ids
        ).values_list('case_id', flat=True)
dataset/ETHPy150Open dimagi/commcare-hq/custom/ewsghana/reports/specific_reports/reporting_rates.py/AlertsData.last_month_reporting_sp_ids/original