code: def select_common_hashes(self, other_entity):
          
          disco_info = yield from self._disco_client.query_info(other_entity)
          intersection = disco_info.features & SUPPORTED_HASH_FEATURES
          if (not intersection and
                  namespaces.xep0300_hashes2 not in disco_info.features):
              raise RuntimeError(
                  "Remote does not support the urn:xmpp:hashes:2 feature.")
          return intersection
docs: Return the list of algos supported by us and `other_entity`. The
          algorithms are represented by their :xep:`300` URNs
          (`urn:xmpp:hash-function-text-names:...`).
  
          :param other_entity: the address of another entity
          :type other_entity: :class:`aioxmpp.JID`
          :returns: the identifiers of the hash algorithms supported by
             both us and the other entity
          :rtype: :class:`set`
          :raises RuntimeError: if the other entity does not support the
             :xep:`300` feature nor does not publish hash functions
             URNs we support.
  
          Note: This assumes the protocol is supported if valid hash
          function features are detected, even if `urn:xmpp:hashes:2` is
          not listed as a feature.