code: def privatekey_to_publickey(private_key_bin: bytes) -> bytes:
      
      if not ishash(private_key_bin):
          raise ValueError('private_key_bin format mismatch. maybe hex encoded?')
      return keys.PrivateKey(private_key_bin).public_key.to_bytes()
docs: Returns public key in bitcoins 'bin' encoding.