def METHOD_NAME(make_stubber, item_count, error_code):
    dyn_stubber = make_stubber(dynamo_batching.dynamodb.meta.client)
    table = dynamo_batching.dynamodb.Table('test-table')
    table_data = [{'test': f'test-{index}'} for index in range(item_count)]
    max_batch_size = 25  # Amazon DynamoDB limit
    data_index = 0
    while data_index < item_count:
        dyn_stubber.stub_batch_write_item({
            table.name: [{
                'PutRequest': {'Item': item}}
                for item in table_data[data_index:data_index+max_batch_size]]
        }, error_code=error_code)
        data_index += max_batch_size
    if error_code is None:
        dynamo_batching.fill_table(table, table_data)
    else:
        with pytest.raises(ClientError) as exc_info:
            dynamo_batching.fill_table(table, table_data)
        assert exc_info.value.response['Error']['Code'] == error_code