code: def _tot_unhandled_hosts_by_state(self, state):
          
          return sum(1 for h in self.hosts if h.state == state and h.state_type == u'HARD' and
                     h.is_problem and not h.problem_has_been_acknowledged)
docs: Generic function to get the number of unhandled problem hosts in the specified state
  
          :param state: state to filter on
          :type state:
          :return: number of host in state *state* and which are not acknowledged problems
          :rtype: int