docs: def batch_write(self, tablename, return_capacity=None,
                      return_item_collection_metrics=NONE):
          """
          Perform a batch write on a table
  
          Parameters
          ----------
          tablename : str
              Name of the table to write to
          return_capacity : {NONE, INDEXES, TOTAL}, optional
              INDEXES will return the consumed capacity for indexes, TOTAL will
              return the consumed capacity for the table and the indexes.
              (default NONE)
          return_item_collection_metrics : (NONE, SIZE), optional
              SIZE will return statistics about item collections that were
              modified.
  
          Examples
          --------
          .. code-block:: python
  
              with connection.batch_write('mytable') as batch:
                  batch.put({'id': 'id1', 'foo': 'bar'})
                  batch.delete({'id': 'oldid'})
  
          """
          return_capacity = self._default_capacity(return_capacity)
          return BatchWriter(self, tablename, return_capacity=return_capacity,
                             return_item_collection_metrics=return_item_collection_metrics)