code: def with_payment_id(self, payment_id=0):
          
          payment_id = numbers.PaymentID(payment_id)
          if not payment_id.is_short():
              raise TypeError("Payment ID {0} has more than 64 bits and cannot be integrated".format(payment_id))
          prefix = 54 if self.is_testnet() else 25 if self.is_stagenet() else 19
          data = bytearray([prefix]) + self._decoded[1:65] + struct.pack('>Q', int(payment_id))
          checksum = bytearray(keccak_256(data).digest()[:4])
          return IntegratedAddress(base58.encode(hexlify(data + checksum)))
docs: Integrates payment id into the address.
  
          :param payment_id: int, hexadecimal string or :class:`PaymentID <monero.numbers.PaymentID>`
                      (max 64-bit long)
  
          :rtype: `IntegratedAddress`
          :raises: `TypeError` if the payment id is too long