def __standardize_result(status, message, data=None, debug_msg=None):
 result = {'status': status, 'message': message}
 if (data is not None):
  result['return'] = data
 if ((debug_msg is not None) and debug):
  result['debug'] = debug_msg
 return result

def __standardize_result ( status , message , data = None , debug_msg = None ) : result = { 'status' : status , 'message' : message } if ( data is not None ) : result [ 'return' ] = data if ( ( debug_msg is not None ) and debug ) : result [ 'debug' ] = debug_msg return result
standardizes all responses .