code: def unpack(self, buff, offset=0):
          
          self.action_type = UBInt16(enum_ref=ActionType)
          self.action_type.unpack(buff, offset)
  
          for cls in ActionHeader.__subclasses__():
              if self.action_type.value in cls.get_allowed_types():
                  self.__class__ = cls
                  break
  
          super().unpack(buff, offset)
docs: Unpack a binary message into this object's attributes.
  
          Unpack the binary value *buff* and update this object attributes based
          on the results.
  
          Args:
              buff (bytes): Binary data package to be unpacked.
              offset (int): Where to begin unpacking.
  
          Raises:
              Exception: If there is a struct unpacking error.