def METHOD_NAME(self, peer_id: ID, pubkey: PublicKey) -> None:
    """
    :param peer_id: peer ID to add public key for
    :param pubkey:
    :raise PeerStoreError: if peer ID and pubkey does not match
    """
    peer_data = self.peer_data_map[peer_id]
    if ID.from_pubkey(pubkey) != peer_id:
        raise PeerStoreError("peer ID and pubkey does not match")
    peer_data.METHOD_NAME(pubkey)