def check_state_result(running, recurse=False):
 if (not isinstance(running, dict)):
  return False
 if (not running):
  return False
 ret = True
 for state_result in six.itervalues(running):
  if ((not recurse) and (not isinstance(state_result, dict))):
   ret = False
  if (ret and isinstance(state_result, dict)):
   result = state_result.get('result', _empty)
   if (result is False):
    ret = False
   elif ((result is _empty) and isinstance(state_result, dict) and ret):
    ret = check_state_result(state_result, recurse=True)
  if (not ret):
   break
 return ret

def check_state_result ( running , recurse = False ) : if ( not isinstance ( running , dict ) ) : return False if ( not running ) : return False ret = True for state_result in six . itervalues ( running ) : if ( ( not recurse ) and ( not isinstance ( state_result , dict ) ) ) : ret = False if ( ret and isinstance ( state_result , dict ) ) : result = state_result . get ( 'result' , _empty ) if ( result is False ) : ret = False elif ( ( result is _empty ) and isinstance ( state_result , dict ) and ret ) : ret = check_state_result ( state_result , recurse = True ) if ( not ret ) : break return ret
check the total return value of the run and determine if the running dict has any issues .