def check_stats_record_format(record):
    """check that the aggregation buckets have the expected format"""
    assert {'key', 'doc_count', 'size'} == set(record.keys())
    assert set(record['size'].keys()) == {'value'}
    assert isinstance(record['key'], str)
    assert isinstance(record['doc_count'], int)
    assert isinstance(record['size']['value'], float)

    return True