code: def business_rule_notification_is_blocked(self, hosts, services):
          # pylint: disable=too-many-locals
          
          # Walks through problems to check if all items in non ok are
          # acknowledged or in downtime period.
          acknowledged = 0
          for src_prob_id in self.source_problems:
              if src_prob_id in hosts:
                  src_prob = hosts[src_prob_id]
              else:
                  src_prob = services[src_prob_id]
              if src_prob.last_hard_state_id != 0:
                  if src_prob.problem_has_been_acknowledged:
                      # Problem hast been acknowledged
                      acknowledged += 1
                  # Only check problems under downtime if we are
                  # explicitly told to do so.
                  elif self.business_rule_downtime_as_ack is True:
                      if src_prob.scheduled_downtime_depth > 0:
                          # Problem is under downtime, and downtimes should be
                          # treated as acknowledgements
                          acknowledged += 1
                      elif hasattr(src_prob, "host") and \
                              hosts[src_prob.host].scheduled_downtime_depth > 0:
                          # Host is under downtime, and downtimes should be
                          # treated as acknowledgements
                          acknowledged += 1
  
          return acknowledged == len(self.source_problems)
docs: Process business rule notifications behaviour. If all problems have
          been acknowledged, no notifications should be sent if state is not OK.
          By default, downtimes are ignored, unless explicitly told to be treated
          as acknowledgements through with the business_rule_downtime_as_ack set.
  
          :return: True if all source problem are acknowledged, otherwise False
          :rtype: bool