code: def register_a_problem(self, prob, hosts, services, timeperiods, bi_modulations):
          if prob.uuid in self.source_problems:
              return []
          now = time.time()
          was_an_impact = self.is_impact
          self.is_impact = True
          impacts = []
          if self.is_impact:
              logger.debug("I am impacted: %s", self)
              if self.is_problem:
                  self.no_more_a_problem(hosts, services, timeperiods, bi_modulations)
              if not was_an_impact:
                  self.set_impact_state()
              impacts.append(self.uuid)
              if prob.uuid not in self.source_problems:
                  self.source_problems.append(prob.uuid)
              for (impacted_item_id, status, timeperiod_id, _) in self.act_depend_of_me:
                  if impacted_item_id in hosts:
                      impact = hosts[impacted_item_id]
                  else:
                      impact = services[impacted_item_id]
                  timeperiod = timeperiods[timeperiod_id]
                  for stat in status:
                      if self.is_state(stat):
                          if timeperiod is None or timeperiod.is_time_valid(now):
                              new_impacts = impact.register_a_problem(prob, hosts,
                                                                      services, timeperiods,
                                                                      bi_modulations)
                              impacts.extend(new_impacts)
              self.broks.append(self.get_update_status_brok())
          return impacts