code: def want_host_notification(self, notifways, timeperiods, timestamp, state, n_type,
                                 business_impact, cmd=None):
          
          if not self.host_notifications_enabled:
              return False
  
          # If we are in downtime, we do not want notification
          for downtime in self.downtimes:
              if downtime.is_in_effect:
                  self.in_scheduled_downtime = True
                  return False
          self.in_scheduled_downtime = False
  
          # Now it's all for sub notificationways. If one is OK, we are OK
          # We will filter in another phase
          for notifway_id in self.notificationways:
              notifway = notifways[notifway_id]
              nw_b = notifway.want_host_notification(timeperiods, timestamp,
                                                     state, n_type, business_impact, cmd)
              if nw_b:
                  return True
  
          # Oh, nobody..so NO :)
          return False
docs: Check if notification options match the state of the host
  
          :param timestamp: time we want to notify the contact (usually now)
          :type timestamp: int
          :param state: host or service state ("UP", "DOWN" ..)
          :type state: str
          :param n_type: type of notification ("PROBLEM", "RECOVERY" ..)
          :type n_type: str
          :param business_impact: impact of this host
          :type business_impact: int
          :param cmd: command launch to notify the contact
          :type cmd: str
          :return: True if contact wants notification, otherwise False
          :rtype: bool