'display warnings, if enabled and any exist in the result'

def _handle_warnings(self, res):

    if C.COMMAND_WARNINGS:
        if (('warnings' in res) and res['warnings']):
            for warning in res['warnings']:
                self._display.warning(warning)
            del res['warnings']
        if (('deprecations' in res) and res['deprecations']):
            for warning in res['deprecations']:
                self._display.deprecated(**warning)
            del res['deprecations']
