import copy


def copy_original_exchange_id(data):
    """Copy each exchange id to the field ``original id`` for use in writing
    ecospold2 files later."""
    for ds in data:
        for exc in ds['exchanges']:
            exc['original id'] = copy.copy(exc['id'])
    return data