code: def add_header(self, ph):
          '''
          Add a PacketHeaderBase derived class object, or a raw bytes object
          as the next "header" item in this packet.  Note that 'header'
          may be a slight misnomer since the last portion of a packet is
          considered application payload and not a header per se.
          '''
          if isinstance(ph, bytes):
              ph = RawPacketContents(ph)
          if isinstance(ph, PacketHeaderBase):
              self._headers.append(ph)
              return self
          raise Exception("Payload for a packet header must be an object that is a subclass of PacketHeaderBase, or a bytes object."f add_header(self, ph):
          '''
          Add a PacketHeaderBase derived class object, or a raw bytes object
          as the next "header" item in this packet.  Note that 'header'
          may be a slight misnomer since the last portion of a packet is
          considered application payload and not a header per se.
          '''
          if isinstance(ph, bytes):
              ph = RawPacketContents(ph)
          if isinstance(ph, PacketHeaderBase):
              self._headers.append(ph)
              return self
          raise Exception("Payload for a packet header must be an object that is a subclass of PacketHeaderBase, or a bytes object.")
docs: Add a PacketHeaderBase derived class object, or a raw bytes object
          as the next "header" item in this packet.  Note that 'header'
          may be a slight misnomer since the last portion of a packet is
          considered application payload and not a header per se.