def METHOD_NAME(rec):
    """
    Takes an edition record dict, rec, and returns an Open Library edition
    suitable for saving.
    :param dict rec: Edition record to add to Open Library
    :rtype: dict
    :return: Open Library style edition representation
    """
    book = {
        'type': {'key': '/type/edition'},
    }
    for k, v in rec.items():
        if k == 'authors':
            if v and v[0]:
                book['authors'] = []
                for author in v:
                    east = east_in_by_statement(rec, author)
                    book['authors'].append(import_author(author, eastern=east))
            continue
        if k in ('languages', 'translated_from'):
            for language in v:
                if web.ctx.site.get('/languages/' + language) is None:
                    raise InvalidLanguage(language)
            book[k] = [{'key': '/languages/' + language} for language in v]
            continue
        if k in type_map:
            t = '/type/' + type_map[k]
            if isinstance(v, list):
                book[k] = [{'type': t, 'value': i} for i in v]
            else:
                book[k] = {'type': t, 'value': v}
        else:
            book[k] = v
    return book