code: def get_key(self, compressed=None):
          
          if compressed is None:
              compressed = self.compressed
          if compressed:
              parity = 2 + (self.y & 1)  # 0x02 even, 0x03 odd
              return ensure_bytes(
                  long_to_hex(parity, 2) +
                  long_to_hex(self.x, 64))
          else:
              return ensure_bytes(
                  b'04' +
                  long_to_hex(self.x, 64) +
                  long_to_hex(self.y, 64))
docs: Get the hex-encoded key.
  
          :param compressed: False if you want a standard 65 Byte key (the most
              standard option). True if you want the compressed 33 Byte form.
              Defaults to None, which in turn uses the self.compressed attribute.
          :type compressed: bool
  
          PublicKeys consist of an ID byte, the x, and the y coordinates
          on the elliptic curve.
  
          In the case of uncompressed keys, the ID byte is 04.
          Compressed keys use the SEC1 format:
              If Y is odd: id_byte = 03
              else: id_byte = 02
  
          Note that I pieced this algorithm together from the pycoin source.
  
          This is documented in http://www.secg.org/collateral/sec1_final.pdf
          but, honestly, it's pretty confusing.
  
          I guess this is a pretty big warning that I'm not *positive* this
          will do the right thing in all cases. The tests pass, and this does
          exactly what pycoin does, but I'm not positive pycoin works either!