def METHOD_NAME(self, form_data: dict):
    qs = Order.objects.filter(event__in=self.events, status__in=form_data['status']).prefetch_related('event')
    addrs = qs.values('email')
    pos = OrderPosition.objects.filter(
        order__event__in=self.events, order__status__in=form_data['status']
    ).values('attendee_email')
    data = "\r\n".join(set(a['email'] for a in addrs if a['email'])
                       | set(a['attendee_email'] for a in pos if a['attendee_email']))
    if self.is_multievent:
        return '{}_pretixemails.txt'.format(self.organizer.slug), 'text/plain', data.encode("utf-8")
    else:
        return '{}_pretixemails.txt'.format(self.event.slug), 'text/plain', data.encode("utf-8")