def encodeToURL(self, server_url):
        if not self.return_to:
            raise NoReturnToError

        # Imported from the alternate reality where these classes are used
        # in both the client and server code, so Requests are Encodable too.
        # That's right, code imported from alternate realities all for the
        # love of you, id_res/user_setup_url.
        q = {'mode': self.mode,
             'identity': self.identity,
             'claimed_id': self.claimed_id,
             'return_to': self.return_to}
        if self.trust_root:
            if self.namespace == OPENID1_NS:
                q['trust_root'] = self.trust_root
            else:
                q['realm'] = self.trust_root
        if self.assoc_handle:
            q['assoc_handle'] = self.assoc_handle

        response = Message(self.namespace)
        response.updateArgs(self.namespace, q)
        return response.toURL(server_url)
Method 'photo_count' should return the count of the photos in this
dataset/ETHPy150Open CollabQ/CollabQ/openid/server/server.py/CheckIDRequest.encodeToURL--crossover with--dataset/ETHPy150Open jdriscoll/django-photologue/photologue/tests/test_gallery.py/GalleryTest.test_photo_count