code: def add_payload(self, payload):
          
          if self.payloads:
              self.payloads[-1].next_payload = payload._type
          self.payloads.append(payload)
docs: Adds a payload to packet, updating last payload's next_payload field