def _get_return_dict(success=True, data=None, errors=None, warnings=None):
 data = ({} if (data is None) else data)
 errors = ([] if (errors is None) else errors)
 warnings = ([] if (warnings is None) else warnings)
 ret = {'success': success, 'data': data, 'errors': errors, 'warnings': warnings}
 return ret

def _get_return_dict ( success = True , data = None , errors = None , warnings = None ) : data = ( { } if ( data is None ) else data ) errors = ( [ ] if ( errors is None ) else errors ) warnings = ( [ ] if ( warnings is None ) else warnings ) ret = { 'success' : success , 'data' : data , 'errors' : errors , 'warnings' : warnings } return ret
private method creates a new return dict with default values .