def get_user_metadata(self, node_to_ask):
        """
        Downloads just a small portion of the profile (containing the name, handle,
        and avatar hash). We need this for some parts of the UI where we list stores.
        Since we need fast loading we shouldn't download the full profile here.
        It will download the avatar if it isn't already in cache.
        """

        def get_result(result):
            try:
                verify_key = nacl.signing.VerifyKey(node_to_ask.pubkey)
                verify_key.verify(result[1][0], result[1][1])
                m = objects.Metadata()
                m.ParseFromString(result[1][0])
                if not os.path.isfile(os.path.join(DATA_FOLDER, 'cache', m.avatar_hash.encode("hex"))):
                    self.get_image(node_to_ask, m.avatar_hash)
                return m
            except Exception:
                return None

        if node_to_ask.ip is None:
            return defer.succeed(None)
        self.log.info(node_to_ask % "fetching user metadata from %s")
        d = self.protocol.callGetUserMetadata(node_to_ask)
        return d.addCallback(get_result)
dataset/ETHPy150Open OpenBazaar/OpenBazaar-Server/market/network.py/Server.get_user_metadata/swapped operands of `%`