def _clean_data(api_response):
 data = {}
 data.update(api_response['DATA'])
 if (not data):
  response_data = api_response['DATA']
  data.update(response_data)
 return data

def _clean_data ( api_response ) : data = { } data . update ( api_response [ 'DATA' ] ) if ( not data ) : response_data = api_response [ 'DATA' ] data . update ( response_data ) return data
returns the data response from a linode api query as a single pre-formatted dictionary api_response the query to be cleaned .