code: def get_host_node_state(self, state, problem_has_been_acknowledged, in_scheduled_downtime):
          
          # Make DOWN look as CRITICAL (2 instead of 1)
          if state == 1:
              state = 2
  
          # If our node is acknowledged or in downtime, state is ok/up
          if problem_has_been_acknowledged or in_scheduled_downtime:
              state = 0
  
          # Maybe we are a NOT node, so manage this
          if self.not_value:
              return 0 if state else 2  # Keep the logic of return Down on NOT rules
          return state
docs: Get host node state, simplest case ::
  
          * Handle not value (revert) for host and consider 1 as 2
  
          :return: 0, 1 or 2
          :rtype: int