public static function delete_data_for_userlist(\core_privacy\local\request\approved_userlist $userlist) {
        list($db, $table) = static::get_database_and_table();
        if (!$db || !$table) {
            return;
        }
        list($insql, $inparams) = $db->get_in_or_equal($userlist->get_userids(), SQL_PARAMS_NAMED);
        $params = array_merge($inparams, ['contextid' => $userlist->get_context()->id]);
        $db->delete_records_select($table, "contextid = :contextid AND userid $insql", $params);
    }