code: def _raise_error_from_response(data):
      
      # Check the meta-data for why this request failed
      meta = data.get('meta')
      if meta:
          # Account for foursquare conflicts
          # see: https://developer.foursquare.com/overview/responses
          if meta.get('code') in (200, 409): return data
          exc = error_types.get(meta.get('errorType'))
          if exc:
              raise exc(meta.get('errorDetail'))
          else:
              _log_and_raise_exception('Unknown error. meta', meta)
      else:
          _log_and_raise_exception('Response format invalid, missing meta property. data', data)
docs: Processes the response data