def METHOD_NAME(self, peer_id: ID, key: str) -> Any:
    """
    :param peer_id: peer ID to get peer data for
    :param key: the key to search value for
    :return: value corresponding to the key
    :raise PeerStoreError: if peer ID or value not found
    """
    if peer_id in self.peer_data_map:
        try:
            val = self.peer_data_map[peer_id].get_metadata(key)
        except PeerDataError as error:
            raise PeerStoreError() from error
        return val
    raise PeerStoreError("peer ID not found")