code: def _check_and_uninstall_python(ret, python, user=None):
      '''
      Verify that python is uninstalled
      '''
      ret = _python_installed(ret, python, user=user)
      if ret['result']:
          if ret['default']:
              __salt__['pyenv.default']('system', runas=user)
  
          if __salt__['pyenv.uninstall_python'](python, runas=user):
              ret['result'] = True
              ret['changes'][python] = 'Uninstalled'
              ret['comment'] = 'Successfully removed python'
              return ret
          else:
              ret['result'] = False
              ret['comment'] = 'Failed to uninstall python'
              return ret
      else:
          ret['result'] = True
          ret['comment'] = 'python {0} is already absent'.format(python)
  
      return ref _check_and_uninstall_python(ret, python, user=None):
      '''
      Verify that python is uninstalled
      '''
      ret = _python_installed(ret, python, user=user)
      if ret['result']:
          if ret['default']:
              __salt__['pyenv.default']('system', runas=user)
  
          if __salt__['pyenv.uninstall_python'](python, runas=user):
              ret['result'] = True
              ret['changes'][python] = 'Uninstalled'
              ret['comment'] = 'Successfully removed python'
              return ret
          else:
              ret['result'] = False
              ret['comment'] = 'Failed to uninstall python'
              return ret
      else:
          ret['result'] = True
          ret['comment'] = 'python {0} is already absent'.format(python)
  
      return ret
docs: Verify that python is uninstalled