Complete the code to check if there are unprocessed items after a batch write.
if response.get('[1]'): print('There are unprocessed items.')
The UnprocessedItems key in the response contains any items that were not processed in the batch write.
Complete the code to retry unprocessed items in a batch write operation.
while '[1]' in response and response['[1]']: response = client.batch_write_item(RequestItems=response['[1]'])
The UnprocessedItems key contains items that need to be retried in batch write operations.
Fix the error in the code that attempts to handle unprocessed items after a batch write.
if response['[1]']: retry_items = response['UnprocessedItems']
The code must check the UnprocessedItems key to find items that need retrying.
Fill both blanks to correctly extract and retry unprocessed items in a batch write.
unprocessed = response.get('[1]', {}) if unprocessed: response = client.batch_write_item(RequestItems=[2])
First, get the UnprocessedItems from the response. Then retry by passing the unprocessed items to batch_write_item.
Fill all three blanks to implement a loop that retries unprocessed items until all are processed.
while response.get('[1]'): unprocessed = response['[2]'] response = client.batch_write_item(RequestItems=[3])
The loop continues while there are UnprocessedItems. It extracts them and retries by passing the unprocessed items to batch_write_item.