

@classmethod
def recent_high_abuse_reports(cls, threshold, period, addon_id=None, addon_type=None):
    '\n        Returns AbuseReport objects for the given threshold over the given time\n        period (in days). Filters by addon_id or addon_type if provided.\n\n        E.g. Greater than 5 abuse reports for all addons in the past 7 days.\n        '
    abuse_sql = ['\n            SELECT `abuse_reports`.*,\n                   COUNT(`abuse_reports`.`addon_id`) AS `num_reports`\n            FROM `abuse_reports`\n            INNER JOIN `addons` ON (`abuse_reports`.`addon_id` = `addons`.`id`)\n            WHERE `abuse_reports`.`created` >= %s ']
    params = [period]
    if addon_id:
        abuse_sql.append('AND `addons`.`id` = %s ')
        params.append(addon_id)
    elif (addon_type and (addon_type in amo.ADDON_TYPES)):
        abuse_sql.append('AND `addons`.`addontype_id` = %s ')
        params.append(addon_type)
    abuse_sql.append('GROUP BY addon_id HAVING num_reports > %s')
    threshold.append(threshold)
    return list(cls.objects.raw(''.join(abuse_sql), params))

dataset/ETHPy150Open mozilla/addons-server/src/olympia/abuse/models.py AbuseReport.recent_high_abuse_reports/VarMisuse@96/375 `params`->`threshold`