code: def update_hard_unknown_phase_state(self):
          
          self.was_in_hard_unknown_reach_phase = self.in_hard_unknown_reach_phase
  
          # We do not care about SOFT state at all
          # and we are sure we are no more in such a phase
          if self.state_type != 'HARD' or self.last_state_type != 'HARD':
              self.in_hard_unknown_reach_phase = False
  
          # So if we are not in already in such a phase, we check for
          # a start or not. So here we are sure to be in a HARD/HARD following
          # state
          if not self.in_hard_unknown_reach_phase:
              if self.state == 'UNKNOWN' and self.last_state != 'UNKNOWN' \
                      or self.state == 'UNREACHABLE' and self.last_state != 'UNREACHABLE':
                  self.in_hard_unknown_reach_phase = True
                  # We also backup with which state we was before enter this phase
                  self.state_before_hard_unknown_reach_phase = self.last_state
                  return
          else:
              # if we were already in such a phase, look for its end
              if self.state != 'UNKNOWN' and self.state != 'UNREACHABLE':
                  self.in_hard_unknown_reach_phase = False
  
          # If we just exit the phase, look if we exit with a different state
          # than we enter or not. If so, lie and say we were not in such phase
          # because we need so to raise a new notif
          if not self.in_hard_unknown_reach_phase and self.was_in_hard_unknown_reach_phase:
              if self.state != self.state_before_hard_unknown_reach_phase:
                  self.was_in_hard_unknown_reach_phase = False
docs: Update in_hard_unknown_reach_phase attribute and
          was_in_hard_unknown_reach_phase
          UNKNOWN during a HARD state are not so important, and they should
           not raise notif about it
  
          :return: None