'Convert a BatchWriteList object into format required for Layer1.'

def to_dict(self):

    d = {}
    for batch in self:
        (table_name, batch_dict) = batch.to_dict()
        d[table_name] = batch_dict
    return d
