code: def update_business_impact_value(self, hosts, services, timeperiods, bi_modulations):
          if self.my_own_business_impact == -1:
              self.my_own_business_impact = self.business_impact
          in_modulation = False
          for bi_modulation_id in self.business_impact_modulations:
              bi_modulation = bi_modulations[bi_modulation_id]
              now = time.time()
              period = timeperiods[bi_modulation.modulation_period]
              if period is None or period.is_time_valid(now):
                  self.business_impact = bi_modulation.business_impact
                  in_modulation = True
                  break
          if self.impacts:
              bp_impacts = [hosts[elem].business_impact for elem in self.impacts if elem in hosts]
              bp_impacts.extend([services[elem].business_impact for elem in self.impacts
                                 if elem in services])
              self.business_impact = max(self.business_impact, max(bp_impacts))
              return
          if self.my_own_business_impact != -1 and not in_modulation:
              self.business_impact = self.my_own_business_impact