def METHOD_NAME(self, with_length=False):
    output = b""
    output += write_with_length(self.pub_key)
    output += bytes([0])  # alg ecc type
    output += write_with_length(self.sig_ser)
    if with_length:
        return write_with_length(output)
    else:
        return output