code: def add_flapping_change(self, sample):
          
          cls = self.__class__
  
          # If this element is not in flapping check, or
          # the flapping is globally disable, bailout
          if not self.flap_detection_enabled or not cls.enable_flap_detection:
              return
  
          self.flapping_changes.append(sample)
  
          # Keep just 20 changes (global flap_history value)
          flap_history = cls.flap_history
  
          if len(self.flapping_changes) > flap_history:
              self.flapping_changes.pop(0)
docs: Add a flapping sample and keep cls.flap_history samples
  
          :param sample: Sample to add
          :type sample: bool
          :return: None