docs: def _ecc_encode_compressed_point(private_key):
      """Encodes a compressed elliptic curve point
          as described in SEC-1 v2 section 2.3.3
          http://www.secg.org/sec1-v2.pdf
  
      :param private_key: Private key from which to extract point data
      :type private_key: cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey
      :returns: Encoded compressed elliptic curve point
      :rtype: bytes
      :raises NotSupportedError: for non-prime curves
      """
      # key_size is in bits. Convert to bytes and round up
      byte_length = (private_key.curve.key_size + 7) // 8
      public_numbers = private_key.public_key().public_numbers()
      y_map = [b"\x02", b"\x03"]
      # If curve in prime field.
      if private_key.curve.name.startswith("secp"):
          y_order = public_numbers.y % 2
          y = y_map[y_order]
      else:
          raise NotSupportedError("Non-prime curves are not supported at this time")
      return y + int_to_bytes(public_numbers.x, byte_length)