def METHOD_NAME(self, *args, **options):
    """
    Execute the command.
    """
    dry_run = options['dry_run']
    chunk_size = options.get('chunk_size', self.DEFAULT_CHUNK_SIZE)
    sleep_between = options.get('sleep_between', self.DEFAULT_SLEEP_BETWEEN_OPTOUTS)
    optout_path = options['optout_csv_path']
    if chunk_size <= 0:
        raise CommandError(f'Only positive chunk size is allowed ({chunk_size}).')
    if sleep_between < 0:
        raise CommandError(f'Only non-negative sleep between seconds is allowed ({sleep_between}).')
    # Read the CSV file. Log the number of user/org rows read.
    with open(optout_path) as csv_file:
        optout_reader = csv.reader(csv_file)
        optout_rows = list(optout_reader)
    log.info("Read %s opt-out rows from CSV file '%s'.", len(optout_rows), optout_path)
    cursor = connections['default'].cursor()
    # Update/insert the rows one chunk at a time.
    curr_row_idx = 0
    start_idx = 0
    while curr_row_idx < len(optout_rows):
        start_idx = curr_row_idx
        end_idx = min(start_idx + chunk_size - 1, len(optout_rows) - 1)
        log.info("Attempting opt-out for rows (%s, %s) through (%s, %s)...",
                 optout_rows[start_idx][0], optout_rows[start_idx][1],
                 optout_rows[end_idx][0], optout_rows[end_idx][1])
        # Build the SQL query.
        query = 'INSERT INTO user_api_userorgtag (`user_id`, `org`, `key`, `value`, `created`, `modified`) VALUES '
        query_values = []
        for idx in range(start_idx, end_idx + 1):
            query_values.append('({},"{}","email-optin","False",NOW(),NOW())'.format(
                optout_rows[idx][0], optout_rows[idx][1])
            )
        query += ','.join(query_values)
        query += ' ON DUPLICATE KEY UPDATE value="False", modified=NOW();'
        # Execute the SQL query.
        if dry_run:
            log.info(query)
        else:
            try:
                cursor.execute('START TRANSACTION;')
                cursor.execute(query)
            except DatabaseError as err:
                cursor.execute('ROLLBACK;')
                log.error("Rolled-back opt-out for rows (%s, %s) through (%s, %s): %s",
                          optout_rows[start_idx][0], optout_rows[start_idx][1],
                          optout_rows[end_idx][0], optout_rows[end_idx][1],
                          str(err))
                raise
            else:
                cursor.execute('COMMIT;')
                log.info("Committed opt-out for rows (%s, %s) through (%s, %s).",
                         optout_rows[start_idx][0], optout_rows[start_idx][1],
                         optout_rows[end_idx][0], optout_rows[end_idx][1])
            log.info("Sleeping %s seconds...", sleep_between)
            time.sleep(sleep_between)
        curr_row_idx += chunk_size