def remove(obj, kind):
    '''
    Handle badge removal API

    - Returns 404 if the badge for this kind is absent
    - Returns 204 on success
    '''
    if not obj.get_badge(kind):
        api.abort(404, 'Badge does not exists')
    obj.remove_badge(kind)
    return '', 204
def remove ( obj , kind ) : if not obj . get_badge ( kind ) : api . abort ( 404 , 'Badge does not exists' ) obj . remove_badge ( kind ) return '' , 204
Handle badge removal API

    - Returns 404 if the badge for this kind is absent
    - Returns 204 on success