title: How to retry BatchWrites in DynamoDB and Python
body: <p>I have a function to do a BatchWrite to DynamoDB using the Python SDK. </p>
  
  <pre><code>def do_batch_write(write_list)
      while True:
          with table_name.do_batch_write() as batch:
              for write in write_list:
                  batch.put_item(write)
  
              if (all writes passed):
                   break
              else:
                  retry unprocessed writes
  </code></pre>
  
  <p>I know that DDB can fail to do some operations and so you need to check for unprocessed writes and retry them, butI couldn't find an example with the newest Python SDK showing how to find the unprocessed writes. Does anyone know the right way to do this?</p>