code: def _convert_public_key(ecdsa_curve_name, result):
      
      if ecdsa_curve_name == 'nist256p1':
          if (result[64] & 1) != 0:
              result = bytearray([0x03]) + result[1:33]
          else:
              result = bytearray([0x02]) + result[1:33]
      else:
          result = result[1:]
          keyX = bytearray(result[0:32])
          keyY = bytearray(result[32:][::-1])
          if (keyX[31] & 1) != 0:
              keyY[31] |= 0x80
          result = b'\x00' + bytes(keyY)
      return bytes(result)
docs: Convert Ledger reply into PublicKey object.