def my_id(self) -> bytes32:
    'If node has public cert use that one for id, if not use private.'
    if (self.p2p_crt_path is not None):
        pem_cert = x509.load_pem_x509_certificate(self.p2p_crt_path.read_bytes(), default_backend())
    else:
        pem_cert = x509.load_pem_x509_certificate(self._private_cert_path.read_bytes(), default_backend())
    der_cert_bytes = pem_cert.public_bytes(encoding=serialization.Encoding.DER)
    der_cert = x509.load_der_x509_certificate(der_cert_bytes, default_backend())
    return bytes32(der_cert.fingerprint(hashes.SHA256()))
If node has public cert use that one for id, if not use private.
def my_id(self) -> bytes32:
    
    if (self.p2p_crt_path is not None):
        pem_cert = x509.load_pem_x509_certificate(self.p2p_crt_path.read_bytes(), default_backend())
    else:
        pem_cert = x509.load_pem_x509_certificate(self._private_cert_path.read_bytes(), default_backend())
    der_cert_bytes = pem_cert.public_bytes(encoding=serialization.Encoding.DER)
    der_cert = x509.load_der_x509_certificate(der_cert_bytes, default_backend())
    return bytes32(der_cert.fingerprint(hashes.SHA256()))