convert volume metadata from archivant to es format

def denormalize_volume(volume):
        '''convert volume metadata from archivant to es format'''
        id = volume.get('id', None)
        res = dict()
        res.update(volume['metadata'])
        denorm_attachments = list()
        for a in volume['attachments']:
            denorm_attachments.append(Archivant.denormalize_attachment(a))
        res['_attachments'] = denorm_attachments
        return id, res