code: def public_key(self):
          
          if self._public_key is None:
              self._public_key = HDPublicKey(x=self._key.public_key.point.x,
                                             y=self._key.public_key.point.y,
                                             chain_code=self.chain_code,
                                             index=self.index,
                                             depth=self.depth,
                                             parent_fingerprint=self.parent_fingerprint)
  
          return self._public_key
docs: Returns the public key associated with this private key.
  
          Returns:
              HDPublicKey:
                  The HDPublicKey object that corresponds to this
                  private key.