def METHOD_NAME(self, domain, repeater_id, *args, **options):
    sleep_time = options.get('sleep_time')
    include_regexps = options.get('include_regexps')
    exclude_regexps = options.get('exclude_regexps')
    verbose = options.get('verbose')
    action = options.get('action')
    success_message = options.get('success_message')
    response_status = options.get('response_status')
    repeater = Repeater.objects.get(repeater_id=repeater_id)
    print("Looking up repeat records for '{}'".format(repeater.friendly_name))
    def meets_filter(record):
        if exclude_regexps:  # Match none of the exclude expressions
            if record.failure_reason:
                if any(re.search(exclude_regex, record.failure_reason)
                       for exclude_regex in exclude_regexps):
                    return False
        if include_regexps:  # Match any of the include expressions
            if not record.failure_reason:
                return False
            return any(re.search(include_regex, record.failure_reason)
                       for include_regex in include_regexps)
        return True  # No filter applied
    records = list(filter(
        meets_filter,
        iter_repeat_records_by_domain(domain, repeater_id=repeater_id, state=RECORD_CANCELLED_STATE)
    ))
    if verbose:
        for record in records:
            print(record.payload_id, record.failure_reason)
    total_records = len(records)
    print("Found {} matching records.  {} them?".format(total_records, action))
    if not input("(y/n)") == 'y':
        print("Aborting")
        return
    filename = "{}_{}_records-{}.csv".format(
        action,
        repeater._repeater_type,
        datetime.datetime.utcnow().strftime('%Y-%m-%d_%H.%M.%S'))
    with open(filename, 'w', encoding='utf-8') as f:
        writer = csv.writer(f)
        writer.writerow(('record_id', 'payload_id', 'state', 'message'))
        for i, record in enumerate(records):
            try:
                if action == 'retrigger':
                    if record.next_check is None:
                        record.next_check = datetime.datetime.utcnow()
                    record.fire(force_send=True)
                elif action == 'succeed':
                    self._succeed_record(record, success_message, response_status)
            except Exception as e:
                print("{}/{}: {} {}".format(i + 1, total_records, 'EXCEPTION', repr(e)))
                writer.writerow((record._id, record.payload_id, record.state, repr(e)))
            else:
                print("{}/{}: {}, {}".format(i + 1, total_records, record.state, record.attempts[-1].message))
                writer.writerow((record._id, record.payload_id, record.state, record.attempts[-1].message))
            if sleep_time:
                time.sleep(float(sleep_time))
    print("Wrote log of changes to {}".format(filename))