def _migrate_dataset_schema(data, client):
    """Migrate from old dataset formats."""
    if 'authors' not in data:
        return
    data['@context']['creator'] = data['@context'].pop('authors', {
        '@container': 'list'})
    data['creator'] = data.pop('authors', {})
    files = data.get('files', [])
    if isinstance(files, dict):
        files = files.values()
    for file_ in files:
        file_['creator'] = file_.pop('authors', {})
    return data
