def format_out(data):
    '''return string of dictionary data according to requested json, yaml, xml. By default json'''
    if bottle.request.headers.get('Accept') in 'application/yaml':
        bottle.response.content_type='application/yaml'
        print yaml.safe_dump(data, explicit_start=True, indent=4, default_flow_style=False, tags=False, encoding='utf-8', allow_unicode=True) 
        return yaml.safe_dump(data, explicit_start=True, indent=4, default_flow_style=False, tags=False, encoding='utf-8', allow_unicode=True) #, canonical=True, default_style='"'
    else: #by default json
        bottle.response.content_type='application/json'
        #return data #json no style
        return json.dumps(data, indent=4) + "\n"
dataset/ETHPy150Open nfvlabs/openmano/openmano/httpserver.py/format_out/swapped operands of `in`