def get_interface(name):
    '''
    Return the serialize function.
    '''
    try:
        log.debug('Using %s as buffer interface', name)
        return BUFFER_LOOKUP[name]
    except KeyError:
        msg = 'Buffer interface {} is not available'.format(name)
        log.error(msg, exc_info=True)
        raise InvalidBufferException(msg)
Return the serialize function.