def METHOD_NAME(rows, data, label):
    for shard_id in sorted(data.keys()):
        rows.extend([
            '{},{},{},{}'.format(shard_id, model.__name__, data[shard_id][model], label)
            for model in sorted(data[shard_id].keys())
        ])