def METHOD_NAME(table, execute_flag, created, id_prefix):
    results = get_all_items_to_revoke(table, created, id_prefix)
    logger.info('Fetched {} rows to revoke using id_prefix={}, created<{}'.format(len(results), id_prefix, created))
    # Sort by created to distribute across partitions (avoid hot partitions)
    results = sorted(results, key=lambda i: i[SORT_KEY])
    if execute_flag:
        # batch_writer handles batching and sending for us automatically
        with table.batch_writer() as batch:
            for item in results:
                item[KEY_RECORD][REVOKED] = True
                batch.put_item(item)
        logger.info('Marked {} keys revoked successfully!'.format(len(results)))
    else:
        logger.info('DRY-RUN would have run batch_writer.put_item for {} keys'.format(len(results)))