def error_msg(message=DELETE_MESSAGE): from utils_helper import Util_Helpers utils_helper_obj = Util_Helpers() utils_helper_obj.success = False template_data = utils_helper_obj.create_response(None) template_data['messages'] = message return template_data