def make_result(self, result_class, node=None, prev_node=None,<EOL>remember=True, key_chunks=None, notify=True, **kwargs):
def canonicalize(node, **kwargs):<EOL><INDENT>return None if node is None else node.canonicalize(**kwargs)<EOL><DEDENT>index = self.index<EOL>result = result_class(canonicalize(node, **kwargs),<EOL>canonicalize(prev_node, **kwargs), index)<EOL>if not remember:<EOL><INDENT>return result<EOL><DEDENT>self.history[index] = result_class(<EOL>canonicalize(node, include_nodes=False),<EOL>canonicalize(prev_node, include_nodes=False), index)<EOL>key_chunks = key_chunks or split_key(node.key)<EOL>asymptotic_key_chunks = (key_chunks[:x + <NUM_LIT:1>]<EOL>for x in xrange(len(key_chunks)))<EOL>event_keys = [(False, key_chunks)]<EOL>for _key_chunks in asymptotic_key_chunks:<EOL><INDENT>exact = _key_chunks == key_chunks<EOL>self.indices.setdefault(_key_chunks, []).append((index, exact))<EOL>event_keys.append((True, _key_chunks))<EOL><DEDENT>if notify:<EOL><INDENT>for event_key in event_keys:<EOL><INDENT>try:<EOL><INDENT>event = self.events.pop(event_key)<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>event.set()<EOL><DEDENT><DEDENT><DEDENT>return result<EOL>
Makes an etcd result.

        If `remember` is ``True``, it keeps the result in the history and
        triggers events if waiting.  `key_chunks` is the result of
        :func:`split_key` of the `node.key`.  It is not required if `remember`
        is ``False``.  Otherwise, it is optional but recommended to eliminate
        waste if the key chunks are already supplied.