def METHOD_NAME(self, data):
    formatted_rows = []
    for shard_id in sorted(data.keys()):
        formatted_rows.append('')
        formatted_rows.append('--------------- shard {} ---------------'.format(shard_id))
        formatted_rows.extend([
            '{}, {}'.format(model.__name__, data[shard_id][model])
            for model in sorted(data[shard_id].keys())
        ])
    return '\n'.join(formatted_rows)